http://www.planet-source-c
This code was made with Microsoft Visual C++ 6.0, and it detects a shutdown and asks for the user to confirm if he wants to shutdown or not. I did not check if it uses specific msvs libraries but you can tweak this code to perform what you want.
as for dcsbeemer's suggestion.
once you detect a shutdown you would do:
system("shutdown -a");
windows.h directory would need to be included.
--------------------------
Also, you may want to put a 20 point pointer in the Programming C++ section if you find difficulties later on.
--------------------------
If you need help modifying the code i could try to help
Good Luck!
-Sof
Main Topics
Browse All Topics





by: dcsbeemerPosted on 2006-01-22 at 10:06:29ID: 15761116
I'm no programmer, but you could try running "shutdown -a" in a command prompt. That usually stops a shutdown from happening ...unless you actually initiated shutdown yourself I think.