[Windows Mobile Apps and Games] chrisstavrou:
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/419726318/csdevctrl.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://xdaforums.com/showpost.php?p=3666785&postcount=702)

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

http://xdaforums.com/showpost.php?p=2424492&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://xdaforums.com/showpost.php?p=2391054&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/webs...ode=EUR&lc=CY&bn=PP-DonationsBF&charset=UTF-8

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.