POWER CONSCIOUS APPS
coming soon.....
Thursday, 3 April 2008
Difference Between CE5.0 6.0 and 7.0
what are the major difference between Windows mobile 5.0 / 6.0 and 7.0 ??
Windows Mobile 5.0 Windows mobile 6.0 Windows mobile 7.0
coming soon.....
Windows Mobile 5.0 Windows mobile 6.0 Windows mobile 7.0
coming soon.....
Minimizing the Delay of the Battery Level Indicator
Minimizing the Delay of the Battery Level Indicator on a Windows Mobile Powered Device esp for smartphone.
The BatteryEarly and BatteryLate values under the HKEY_LOCAL_MACHINE\Software\Microsoft\ssupdate registry key control polling of the battery. Place the code to set or clear the BatteryEarly and BatteryLate values code in the Platform.reg file. Turn off battery polling by clearing both the BatteryEarly and BatteryLate values.
The following code example shows how to turn off battery polling.
Copy Code
[HKEY_LOCAL_MACHINE\Software\Microsoft\ssupdate]
"BatteryEarly"=dword:0
"BatteryLate"=dword:0
After specifying the BatteryEarly and BatteryLate values, you must force the shell to update.
hevent = CreateEvent(NULL, FALSE, FALSE, TEXT("SSUpdatePower"));
SetEvent(hevent);
CloseHandle(hevent);
or you can use BatteryPDDGetStatus in the battery driver this can be called once you call GetSystemPowerStatusEx2
for example:
GetSystemPowerStatusEx2 ( &sysPowerStatus, sizeof( sysPowerStatus ), TRUE );//this will call BatteryPDDGetStatus
handle the battery indication stuff in the BatteryPDDGetStatus and after that you must refresh MDD power level cache this you can do by calling:
PowerPolicyNotify ( PPN_POWERCHANGE, 0 );//update cache so that icon is displayed without delay
To be Continued ........will write more in detail later
The BatteryEarly and BatteryLate values under the HKEY_LOCAL_MACHINE\Software\Microsoft\ssupdate registry key control polling of the battery. Place the code to set or clear the BatteryEarly and BatteryLate values code in the Platform.reg file. Turn off battery polling by clearing both the BatteryEarly and BatteryLate values.
The following code example shows how to turn off battery polling.
Copy Code
[HKEY_LOCAL_MACHINE\Software\Microsoft\ssupdate]
"BatteryEarly"=dword:0
"BatteryLate"=dword:0
After specifying the BatteryEarly and BatteryLate values, you must force the shell to update.
hevent = CreateEvent(NULL, FALSE, FALSE, TEXT("SSUpdatePower"));
SetEvent(hevent);
CloseHandle(hevent);
or you can use BatteryPDDGetStatus in the battery driver this can be called once you call GetSystemPowerStatusEx2
for example:
GetSystemPowerStatusEx2 ( &sysPowerStatus, sizeof( sysPowerStatus ), TRUE );//this will call BatteryPDDGetStatus
handle the battery indication stuff in the BatteryPDDGetStatus and after that you must refresh MDD power level cache this you can do by calling:
PowerPolicyNotify ( PPN_POWERCHANGE, 0 );//update cache so that icon is displayed without delay
To be Continued ........will write more in detail later
Subscribe to:
Posts (Atom)