|
-
August 3rd, 2001, 02:59 PM
#1
Forcing a ShutDown
You can force a shutdown by doing the Following:
First declare this API function and constant
public Declare Function ExitWindowsEx Lib "user32" (byval uFlags as Long, byval dwReserved as Long) as Long
public Const EWX_SHUTDOWN = 1
Then you can call it by doing this:
Call ExitWindowsEx(EWX_SHUTDOWN, 1) 'shut down the computer
Please rate this posting if you like it
F. T. W.
-
August 6th, 2001, 02:52 AM
#2
Re: Forcing a ShutDown
I like but I am out of votes, for today (here we can rate only 5 time a day...). Let me give youa suggestion: as usually we post questions and not answers at first klevel, you should name your posts starting with:
"Re: how to..." just to signal it is not a question, but an answer.
Have a nice day, and thanks for all the sharing code job
Cesare
Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris
and all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
The Rater
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
August 6th, 2001, 04:11 AM
#3
Re: Forcing a ShutDown
from api guide:
other useful const for that api are:
Const EWX_LOGOFF = 0
Const EWX_SHUTDOWN = 1
Const EWX_REBOOT = 2
Const EWX_FORCE = 4
Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris
and all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
The Rater
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
August 6th, 2001, 03:04 PM
#4
Re: Forcing a ShutDown
Thanx! I'll remeber it next time
F. T. W.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|