Different Ways of a Windows 9x Shutdown

Submitted on: 1/1/2015 1:53:00 PM
By: Agent White (from psc cd)  
Level: Beginner
User Rating: By 5 Users
Compatibility: Microsoft Visual C++
Views: 569
     Explains an interesting way to shutdown a Windows 9x PC in only 1 Line of Source Code. But not only to shutdown... have a look for details


Another way to handle Windows-Shutdowns... You can run many Windows Function direct with the RunDLL32 program. Now I will explain you how this will works for a shutdown ... it's very simple !!! Just put these line in your Project:


"rundll32 shell32.dll,SHExitWindows VALUE");

Here are the different VALUES you can put in:

0 Logoff User

1 Shutdown Windows

2 Restart Windows

4 Force Applications to be killed

8 Poweroff (if supported by your PC)

-1 restart the GUI without a shutdown

You can also add values together (but the -1 value must be called alone)...

The value of 13 consists of value 1 + 4 + 8 and will force the kill of all applications and shutdown Windows with poweroff...

There is also a function called ExitWindowsEx() in Microsofts Visual C++ which does exactly the same... but can't handle the -1 value !!!

cu Agent_White

Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this article (in the Beginner category)?
(The article with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)

Other User Comments

 There are no comments on this submission.

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular article, please click here instead.)

To post feedback, first please login.