locked
How to wake up windows pocket pc device. RRS feed

  • Question

  • How to change device power state to ON mode when it is in sleep mode. I have a messaging application in which I need to play sound when a message is received. But when receving message, if device is in sleep mode, the sound is not played.

    Please suggest for following:
    1) How can I play sound when new message is received and device is in sleep mode?
    2) How to change device power mode to ON when device is in sleep mode?

    Regards.
    • Changed type Am_ac1 Friday, July 10, 2009 10:29 AM
    Thursday, July 9, 2009 11:18 AM

Answers

  • Hello,

    You can use SetSystemPowerState(NULL, POWER_STATE_ON, POWER_FORCE);


    For play sound can you tell us which kind of file u need to play i.e wav or mp3 or etc.

    if wav then you can use PlaySound ( LPCSTR pszSound , HMODULE hmod , DWORD fdwSound );

    otherwise there are other ways of playing sound file.

    Thanks
    Arpit Pradhan


    WinCE CODER
    • Marked as answer by Am_ac1 Friday, July 10, 2009 10:30 AM
    Thursday, July 9, 2009 11:29 AM
  • You also may want to check out this article on Windows Mobile power management should you come across any other power related questions:

    http://www.codeproject.com/KB/mobile/WiMoPower1.aspx
    Joel Ivory Johnson
    • Marked as answer by Am_ac1 Friday, July 10, 2009 10:30 AM
    Thursday, July 9, 2009 2:51 PM

All replies

  • Hello,

    You can use SetSystemPowerState(NULL, POWER_STATE_ON, POWER_FORCE);


    For play sound can you tell us which kind of file u need to play i.e wav or mp3 or etc.

    if wav then you can use PlaySound ( LPCSTR pszSound , HMODULE hmod , DWORD fdwSound );

    otherwise there are other ways of playing sound file.

    Thanks
    Arpit Pradhan


    WinCE CODER
    • Marked as answer by Am_ac1 Friday, July 10, 2009 10:30 AM
    Thursday, July 9, 2009 11:29 AM
  • Thanks Arpit131, It solved my problem,

    Regards.
    Thursday, July 9, 2009 1:18 PM
  • You also may want to check out this article on Windows Mobile power management should you come across any other power related questions:

    http://www.codeproject.com/KB/mobile/WiMoPower1.aspx
    Joel Ivory Johnson
    • Marked as answer by Am_ac1 Friday, July 10, 2009 10:30 AM
    Thursday, July 9, 2009 2:51 PM
  • The post was really much wanted and thanks for the help,

    Regards.
    Friday, July 10, 2009 10:29 AM