Urgent: how to prevent the device automatic switch off.

G

Guest

I am using CeRunAppAtTime () API to launch an application on a specified

interval. This application when launched by system (irrespective of device is

switched on or off) sends a privtae message to other application and closes

itself. On recieve of the private message other application displays a custom

reminder notification and reschedule using CeRunAppAtTime () API after
specified

interval.

This works fine except following condition...

When the time of application start by CeRunAppAtTime and the device automatic

swithc off time (by setting turn off device if not used for 1 min.) are same.

In this case on the time stamp application is launched by CeRunAppAtTime and

immidiately device is switched off before the notification is shown.. and
intern

I am not getting reminder.

Please let me know how to keep the device on (not let device switched off)
till

the notification is shown.


I tried using hHandle = SetPowerRequirement(TEXT("BKL1:"), D0, POWER_NAME |
POWER_FORCE, NULL, 0); to keep the back light on and ReleasePowerRequirement
( hHandle ) to release the requirement after operation is done. But this is
not solving the problem.

I tried the power manager sample of Windows Mobile 5.0 SDK,
SetPowerRequirement API is not making any difference in this sample also.


I used SystemIdleTimerReset() also to avoid switching off but this is also
not working.

Any pointer to keep the device switched on (not let device switched off) till

the notification is shown.
 
W

willempie

Every body who stores a questiuon in these news group have there own kind of
URGENT
so don't shout out ! and be patient
Willempie
 
S

Sergey Bogdanov

Not sure but try this:

[DllImport("Aygshell.dll")]
private static extern void SHIdleTimerReset();
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top