U UJ May 22, 2006 #1 How can I programmatically reboot the machine? I don't want to just shut it down, I want to actually reboot it. TIA - Jeff.
How can I programmatically reboot the machine? I don't want to just shut it down, I want to actually reboot it. TIA - Jeff.
V Vadym Stetsyak May 22, 2006 #2 Hello, UJ! U> How can I programmatically reboot the machine? I don't want to just shut U> it down, I want to actually reboot it. you'll have to P/Invoke to use that API http://www.codeguru.com/cpp/w-p/win32/tutorials/article.php/c8647/ -- Regards, Vadym Stetsyak www: http://vadmyst.blogspot.com
Hello, UJ! U> How can I programmatically reboot the machine? I don't want to just shut U> it down, I want to actually reboot it. you'll have to P/Invoke to use that API http://www.codeguru.com/cpp/w-p/win32/tutorials/article.php/c8647/ -- Regards, Vadym Stetsyak www: http://vadmyst.blogspot.com
J james.curran May 22, 2006 #3 From PInvoke.net: class Class1 { [DllImport("user32.dll")] static extern bool ExitWindowsEx(ExitWindows uFlags, ShutdownReason dwReason); [STAThread] static void Main(string[] args) { ExitWindowsEx(ExitWindows.Reboot, ShutdownReason.MajorOther & ShutdownReason.MinorOther); } }
From PInvoke.net: class Class1 { [DllImport("user32.dll")] static extern bool ExitWindowsEx(ExitWindows uFlags, ShutdownReason dwReason); [STAThread] static void Main(string[] args) { ExitWindowsEx(ExitWindows.Reboot, ShutdownReason.MajorOther & ShutdownReason.MinorOther); } }
G Goran Sliskovic May 22, 2006 #4 UJ said: How can I programmatically reboot the machine? I don't want to just shut it down, I want to actually reboot it. TIA - Jeff. Click to expand... http://www.mentalis.org/soft/class.qpx?id=7 Regards, Goran
UJ said: How can I programmatically reboot the machine? I don't want to just shut it down, I want to actually reboot it. TIA - Jeff. Click to expand... http://www.mentalis.org/soft/class.qpx?id=7 Regards, Goran