How can I shutdown a Windows Mobile device programatically

前端 未结 7 771
陌清茗
陌清茗 2020-12-18 11:36

I would like to programatically shutdown a Windows Mobile device using Compact framework 2.0, Windows mobile 5.0 SDK.

Regards,

7条回答
  •  执笔经年
    2020-12-18 11:44

    Another thing to note with the ExitWindowsEx API is that shutdown is only supported on Windows Mobile Standard (i.e. Smartphone) and not Windows Mobile Professional (Pocket PC) devices.

    See the special notes on the EWX_POWEROFF flag within the ExitWindowsEx documentation on MSDN. I have not tried the API on Pocket PC for a couple of years, but I'm pretty sure that's still the state of play.

    Instead you may like to investigate using the power management APIs to put the device into a lower power state, such as suspended, or unattended mode. What are you attempting to achieve by programatically shutting off the device?

提交回复
热议问题