|
-
Feb 14th, 2001, 04:56 PM
#1
Thread Starter
Member
how can i Shutdown windows with api please help me
-
Feb 14th, 2001, 05:05 PM
#2
Take a look at this thread.
-
Feb 14th, 2001, 05:49 PM
#3
Code:
Private Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
Private Const EWX_POWEROFF = &H8
Private Const EWX_FORCE = 4
Private Sub Command1_Click()
ExitWindowsEx EWX_POWEROFF Or EWX_FORCE, 0
End Sub
-
Feb 15th, 2001, 12:48 AM
#4
Fanatic Member
This is the command..
This is the command the shut down box gives your computer:
[code]
shell(Rundll32.exe KRNL386.EXE,ExitKernel)
[\code]
it's not api but it is short and doesn't cause a improper shutdown(no scandisk)
and it doesn't prompt you to close anything it just shuts down.
Last edited by ExtremePimpness; Feb 15th, 2001 at 12:52 AM.
-
Feb 16th, 2001, 07:12 AM
#5
Addicted Member
private declare function ExitWindowsEx Lib "user32" _
(byval dwFlags As Long,byval dwReserved As Long) _
As Long
To Shut Down, Pass 0 To dwFlags
This Function If Not Successful Returns A Numeric Code In Case Any App Cancelled The ShutDown.
Eg:
ExitWindowsEx 0,0
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
|