2014-06-21 145 views
0

我將返回下面的代碼,但它不適用於關機。重新啓動適合我。從智能設備應用程序關閉Windows移動設備

[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 
} 

回答

相關問題