خاموش و ریستارت و …. کردن سیستم با کد سی شارپ
نکته شماره 3 :
[DllImport("user32.dll")]public static extern int ExitWindowsEx(int uFlags, int dwReason);// RebootExitWindowsEx(2, 0);// RebootSystem.Diagnostics.Process.Start("ShutDown", "/r");// ShutdownExitWindowsEx(1, 0);// ShutdownSystem.Diagnostics.Process.Start("ShutDown", "/s");// Log OffExitWindowsEx(0, 0);// Force LogOffExitWindowsEx(4, 0);// Log OffSystem.Diagnostics.Process.Start("ShutDown", "/l");
+ نوشته شده در سه شنبه هفتم فروردین ۱۳۹۷ ساعت 14:5 توسط محسن
|