|
-
Mar 30th, 2001, 08:27 AM
#1
Thread Starter
Frenzied Member
-
Apr 1st, 2001, 04:26 AM
#2
Member
how to shutdown using api
hi ,
the api's
is exitwindowsex
declares:
Public Const SHUT_DOWN_WINDOWS As String = 123
Public Const RESTART_WINDOWS As String = 789
Public Const LOGOFF_WINDOWS As String = 456
Public Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Public Const EWX_LOGOFF = 0
Public Const EWX_SHUTDOWN = 1
Public Const EWX_REBOOT = 2
Public Const EWX_FORCE = 4
Public Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
useage:
ExitWindowsEx EWX_FORCE Or EWX_SHUTDOWN, 0
ExitWindowsEx EWX_FORCE Or EWX_REBOOT, 0
-
Apr 1st, 2001, 07:30 AM
#3
Thread Starter
Frenzied Member
Anyway, what is your question?
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
|