Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Windows Shutdown
Message
From
16/08/2000 11:47:30
 
General information
Forum:
Visual Basic
Category:
Windows API functions
Miscellaneous
Thread ID:
00405434
Message ID:
00405563
Views:
15
>Declare Function InitiateSystemShutdown Lib "advapi32.dll" Alias "InitiateSystemShutdownA" (ByVal lpMachineName As String, ByVal lpMessage As String, ByVal dwTimeout As Long, ByVal bForceAppsClosed As Long, ByVal bRebootAfterShutdown As Long) As Long
>
>
>This is the API call but I haven't used it so your on your own in that regard
Option Explicit

Public Const EWX_LOGOFF As Long = 0
Public Const EWX_SHUTDOWN As Long = 1
Public Const EWX_FORCE As Long = 4
Public Const EWX_REBOOT = 2

Declare Function ExitWindowsEx Lib "user32.dll" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long

sub ShutItDown()
    X = ExitWindowsEx(EWX_SHUTDOWN, 0)
end sub
~Joe Johnston USA

"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams

Previous
Reply
Map
View

Click here to load this message in the networking platform