FORUMS
Remove All Ads from XDA

(UPDATED 18-09-2010) Auto Lock (CSDEVCTRL)

471 posts
Thanks Meter: 28
 
By chrisstavrou, Recognized Developer on 19th April 2008, 07:14 AM
Post Reply Email Thread
Hi all,
as am now moving to a more open platform (android), i would like to return the favor of learning through this forum, how to program on win mobile by posting the code of this utility.

Its given as is, no warranties, no tricks, do not expect a well written code etc.
Based on C++, no .Net.

Hope will provide to someone, knowledge and info on this subject.

Have fun with it.
Chris

This is the link

http://rapidshare.com/files/41972631...vctrl.zip.html

--- Old introduction ---
Hi all,
this is mainly an auto locking program which utilizes the Windows Locking for partial locking (phone related keys are active)
or complete locking (no keys are active).

It can be considered as an add-on to other programs which provide the User Interface, an 'In Call Locker'
with some goodies as mentioned later on which may or not depend on whether the device is locked (with any program that uses
the Windows locking).

The locking can be activated at the following events:
1. After a specified period of idle time (no screen tapping or touching the keyboard).
2. After the device has waken up.
3. During a call ("In-Call Locking" Partial or Full).

Also for any of the first 2 events (idle or wake up) the program can run a specified executable/registered file together with any command line arguments that might be required.

Finally, some 'goodies':
(Stand-alone means it does not require any other option or the device to be locked)

A.(Stand-alone) it can provide some customization on the carrier name so that:
- It can fit on the screen (for example not to overwrite the Battery icon in SPB Shell).

B. (Stand-alone) Turn on Bluetooth if a call is being dialed or received. Then switch it off after
the call has ended and the headset is not connected.
Usefull if you have a bluetooth handsfree kit in your car and you do not want to keep on turning on/off
the bluetooth.

C. (Stand-alone) Flash the Backlight and or Vibrate while ringing.
At last, you can 'see' if your phone is ringing.

D. Reset the Exchange Server Policy.
Stops the frustrating setting of the password being required after connecting to the exchange server.

F. Turn off the display or/and the device itself.
It can be used as a power saver while playing music etc.

G. Set your favorite SIP (which is being reset back to the default with every soft reset).

H. HotKeys (NEW)
You can assign as sequence of keys to perform an action.
(see http://forum.xda-developers.com/show...&postcount=702)

The parameters that are driving the behaviour of this utility are located at:

http://forum.xda-developers.com/show...&postcount=148

The parameters can also be updated using the setup program provided (csdevctrlsetup.exe).

A flow diagram of the parameters that relate to locking, is provided in the zip file for better understanding of their use.

The debugscr.exe program has been added to help identifying the keystroke codes and coordinates. Before this program is executed
the csdevctrl must be stopped as mentioned further down.

To install it:
- Use the cab file provided.

Simply run it and it will create:

- under the 'Program Files' a directory with name CSDevCtrl'
This directory will contain:
csdevctrl.exe is the main program
csdevctrlsetup.exe is the setup program
debugscr.exe is a utility to find the coordinates and keystrokes (optional).

- Shortcuts under the 'Programs'.

- They can be installed either in the internal memory or on a storage card.

To run it:
> Run the Setup program to set the parameters and the Start Up option.
> Run the program (csdevctrl) and it will spawn at the background as another process.
The device will vibrate once to show that the program has started.

To stop it:
> Running the program second time will cause the program to exit (It will show a confirmation window which will close in 3 seconds unless you close it sooner).

To uninstall it:
> Close the process as usual (run it again or kill the process).
> Remove it from the installed programs.
> Also delete the registry key HKEY_LOCAL_MACHINE\Software\CSDevCtrl

As a note, do not rename the csdevctrl.exe as the uninstall depends on this name.

It has been compiled only for WM6.

For more information see the next link:

http://forum.xda-developers.com/show...&postcount=142


If you wish to buy me a beer or a pitta of souvlaki for my effort, feel free to click on the link below:

https://www.paypal.com/cgi-bin/websc...harset=UTF%2d8


Cheers
Chris

Log:
29/11 - v.6.5 - Added power off after disconnect, support for 6.5 win (beta)
17/09 - v.6.18 - General Policy handling, Dump variables for debugging purposes
04/08 - v.6.16 - Added option for startup delay, Keep the backlight on while on call, lock when dimmed.
27/06 - v.6.15 - Added option to lock only if specific programs are running
20/06 - v.6.14.1 - Fixes.
Attached Files
File Type: zip csdevctrldebug.zip - [Click for QR Code] (33.1 KB, 1207 views)
File Type: cab csdevctrl.6.5.CAB - [Click for QR Code] (139.4 KB, 6034 views)
 
 
19th April 2008, 11:06 AM |#2  
NguyenHuu's Avatar
Senior Member
Flag California
Thanks Meter: 115
 
More
no bad, i like how it uses the built in windows lock.
19th April 2008, 06:56 PM |#3  
OP Recognized Developer
Flag Nicosia
Thanks Meter: 28
 
More
Thanks,
it works well with my favourite program (Spb shell) which is the reason of me developing this.
20th April 2008, 12:21 AM |#4  
Junior Member
Thanks Meter: 1
 
More
this works great on the smartphone but there is a visible window which can be closed too easily with task managers and can't be navigated away from.
any poss you could hide it rather than minimise it?
looeee
20th April 2008, 10:33 AM |#5  
OP Recognized Developer
Flag Nicosia
Thanks Meter: 28
 
More
i have updated the program to be windowless as you mentioned (attachment replaced)

Hope it works for you.

Cheers
Chris
20th April 2008, 01:38 PM |#6  
FInixNOver's Avatar
Senior Member
Thanks Meter: 410
 
More
Quote:
Originally Posted by chrisstavrou

i have updated the program to be windowless as you mentioned (attachment replaced)

Hope it works for you.

Cheers
Chris

First of all, thanks for sharing!! This is a very nice app.
I've tested the 2 versions (window and windowless), and I have a suggestion if I may.
I like the idea of the program being windowless, since it becomes more appealing to the eye (I mean, it's great we don't have to see the small window minimize everytime we wake the device), but now, to be able to close the app, we must use a task manager to kill the process(e.g. sometimes we may want to test some other locking software and we need to disable it temporarily). So my suggestion would be that when we run the program once it starts, the next time we run it, it stops. Would that be possible? I think it would make your app perfect!!
Remember, it's only a suggestion.

Thanks in advance.
20th April 2008, 04:54 PM |#7  
OP Recognized Developer
Flag Nicosia
Thanks Meter: 28
 
More
Its good to know that it may be of use by someone

I have updated it as you mentioned, it will exit if you run it the second time (attachment replaced).
20th April 2008, 10:52 PM |#8  
FInixNOver's Avatar
Senior Member
Thanks Meter: 410
 
More
Thumbs up
Quote:
Originally Posted by chrisstavrou

Its good to know that it may be of use by someone

I have updated it as you mentioned, it will exit if you run it the second time (attachment replaced).

Now it's just great!!

Thank you very much for this.
20th April 2008, 11:10 PM |#9  
NiteStalker's Avatar
Senior Member
Flag Las Cruces
Thanks Meter: 8
 
More
What's the purpose of this app, from the description above it looks as though it does what the original lock already does, so I ask again; what's the purpose of this app?
20th April 2008, 11:57 PM |#10  
FInixNOver's Avatar
Senior Member
Thanks Meter: 410
 
More
Quote:
Originally Posted by NiteStalker

What's the purpose of this app, from the description above it looks as though it does what the original lock already does, so I ask again; what's the purpose of this app?

Automatic lock!!
Once your device light gets dimmed, or on device wake up, without having to press the lock button.
Is that clear enough for you?
21st April 2008, 02:17 AM |#11  
NiteStalker's Avatar
Senior Member
Flag Las Cruces
Thanks Meter: 8
 
More
Just set the time for 0 minutes, and it's locked on wake-up.

Guess the dim part is good, thanks for clearing that up. I guess my brain wasn't working, I couldn't figure out what deemed was.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes