Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I found sourcecode on the <a href="http://forum.xda-developers.com/archive/index.php/t-379366.html" rel="nofollow noreferrer">xda-developers forum</a> that explains what to do, and it works as thought. The main points are:</p> <ul> <li>Set the device to send a notification when going into "unattended" mode. This is done with <code>PowerPolicyNotify(PPN_UNATTENDEDMODE, TRUE)</code></li> <li>For every device that you need during unattended mode, call <code>SetPowerRequirement(L"gpd0:", D0, POWER_NAME|POWER_FORCE, NULL, NULL)</code>; The "gpd0:" device is the GPS Intermediate driver; replace or duplicate call with any device you need, e.g. "wav1:" for audio, "dsk1:" for memory card or "com1:" for serial port 1.</li> <li>Create a message queue and request power notifications using <code>RequestPowerNotifications(hMsgQueue, PBT_POWERINFOCHANGE | PBT_TRANSITION)</code></li> <li>Every time a power notification is sent, the message queue is filled with a struct of type <code>POWER_BROADCAST</code>.</li> <li>Look for <code>PBT_TRANSITION</code> message type. The field <code>pPwrBrodcast-&gt;SystemPowerState</code> then contains a string "unattended" when the device is shut off, e.g. by the user pressing the off button</li> <li>In this transition, just call <code>SystemIdleTimerReset()</code> to tell the device to not shut off</li> <li>Repeat when the transition occurs again</li> <li>When shutting down, call <code>PowerPolicyNotify()</code> to leave unattended mode, release any devices with <code>ReleasePowerRequirement()</code> and stop receiving power notifications with <code>StopPowerNotifications()</code>.</li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload