[英]How can I get a certificate for a smart device application in windows mobile?
[英]Shutdown the windows mobile device from smart device application
我在下面的代碼中返回了,但是它無法關閉。 重新啟動對我來說很好。
[DllImport("Aygshell.dll")]
internal static extern bool ExitWindowsEx(uint uFlags, int dwReason);
private void btnLogout_Click(object sender, EventArgs e)
{
ExitWindowsEx(2, 0); // restart
ExitWindowsEx(1, 0); // shutdown not working
}
通常我會使用Power_Off調用SetSystemPowerState。 ( http://msdn.microsoft.com/en-us/library/aa929251.aspx )。 或者,使用POWER_STATE_CRITICAL進行調用(這可能導致完全關閉)。 ( http://msdn.microsoft.com/en-us/library/ms920754.aspx )
另外,您也可以將keybd_event與VK_OFF一起使用。
這兩個功能可能不會完全關閉設備,這取決於OEM的PowerManagement實現。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.