Launching background services on PocketPC

I recently bought a new mobile phone running Windows Mobile 6.1 Professional. And of course, I'm currently studying some hobby-based encodings for him. My plan is for the service to function as a DLL loaded by Services.exe. This is necessary to collect som data and process som at regular intervals (every 5-10 minutes).

Since I need to run this at regular intervals, for me it is a bit problematic that the system usually goes into sleep mode (pauses) after a short period of user inactivity.

I read all the documentation I could find on MSDN and the MSDN blogs on this subject, and it seems to me that there are three possible solutions to this problem:

  • Keep the system in the Always On state by periodically calling SystemIdleTimerReset . This seems a little excessive, and therefore out of the question.

  • The system wakes up periodically with CeRunAppAtTime and enters an automatic state to complete my processing.

  • Use an automatic state instead of going into full suspension. This would be transparent to the user, but the system never fell asleep.

The second approach is apparently preferable, but this requires that the executable is called by the system upon waking up, and the only task is to notify my service that it should start processing. This seems a bit unnecessary, and I would like to avoid this extra executable. I could, of course, move all my processing to this additional executable file, but I would like to use some of the tools provided when working as a service, and also not run the program (even if it is in the background) whenever processing begins.

, , , , . , MSDN, , , ( , WM , . , , ).

, , :

  • ? .

  • , ? API, ?

  • , - /, , . . , .

  • , (): SystemIdleTimerReset, ?

, , , , , , .


, , ( !).

, , , .

+5
2

CERunAppAtTime - API ( - ). . (. pwszAppName MSDN). , ( , ) , WaitForSingleObject .

, (, MP3-), , (, ).

, powr, suspend, RAM. ( - , OEM ).

SystemIdleTimerReset - . , , , , , OEM. , , . , , ( ), .

+6

, , , WM , , - , , , . - , , , .

. :

(MSDN)

Power To The People ( 1, 2, )

Power-Effective WM Apps ( )

+1

All Articles