|
-
July 12th, 2001, 08:37 AM
#1
Shutdown and Restart API's for VB6
I got to playing with some new shells and like the speed that can be gained without the fluff.
Could someone here tell me how to access the shutdown and restart commands from the program under design? It'll save a lot on the having to ctrl+alt+del just to shutdown. Thanks for any suggestions.
-
July 14th, 2001, 02:04 PM
#2
Hey Shift...
Here is what you would use for VB.
Declaration:
Private Declare Function ExitWindowsEx Lib "user32" _
(ByVal uFlags As Long, ByVal dwReserved As Long) As Long
Then just call the function from a click event or whatever.
Dim rc As Long
rs=ExitWIndows(PARAMETER)
you can use any parameter from the list
EWX_LOGOFF
EWX_SHUTDOWN
EWX_REBOOT
EWX_FORCE
EWX_POWEROFF
EWX_FORCEIFHUNG
so you would use
Dim rc As Long
rc=ExitWindowsEx(EWX_SHUTDOWN)
...hope that helps, you can build a class file for the different params. I have built a class file and dll that you can call from your app. lemme know...............eeeshh if I can find it.
l8r, opiate
-
July 16th, 2001, 10:09 AM
#3
Thanks Opiate,
I'll try it this week. Building classes is a little out of my league right now, but I'm getting there.
See you around,
LabRat
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
|
|
Bookmarks