VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Restart Windows using ExitWindowsEx API Call.

by Lateef Khan (1 Submission)
Category: Windows System Services
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Wed 28th June 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Restart Windows using ExitWindowsEx API Call.

API Declarations


Const EWX_REBOOT = 2
Const EWX_LOGOFF = 0
Const EWX_FORCE = 4

Private Declare Function ExitWindowsEx Lib "user32" _
(ByVal uFlags As Long, _
ByVal dwReserved As Long) _
As Long

Rate Restart Windows using ExitWindowsEx API Call.



Private Sub cmdRestart_Click()
    'Restart Windows (works on Windows 95/NT)
    ExitWindowsEx EWX_LOGOFF, 0
End Sub

Download this snippet    Add to My Saved Code

Restart Windows using ExitWindowsEx API Call. Comments

No comments have been posted about Restart Windows using ExitWindowsEx API Call.. Why not be the first to post a comment about Restart Windows using ExitWindowsEx API Call..

Post your comment

Subject:
Message:
0/1000 characters