Help - Search - Members - Calendar
Full Version: Shutdown Remote win 2k3 server with C++
Pixel2Life Forum > Help Section > Desktop Programming
JD Fr33l@nc3
How do I shutdown or restart a remote windows 2003 server using C++ ?

What is the code?

Thanks

posts merged:

make that windows 2000 * smile.gif
JoeyMagz
I know this is really late for the question but here's the answer.

CODE
ExitWindowsEx(EWX_SHUTDOWN | EWX_FORCEIFHUNG, -1);


That's for anyone else who was wondering. Also, all I did was go into visual c++ and started typing random words that had to do with leaving or quitting and that popped up in the little tooltip box. happy.gif It's always better to experiment with programming before asking questions. Happy programming!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.