benlinkknilneb
Programmer
Hi all, I'm using NT Workstation and I want to reboot. I found this code:
But when it runs, I get an error that says "can't find the entry point InitiateSystemShutdown in advapi.dll". What am I missing?
Ben
Code:
Private Declare Function InitiateSystemShutdown Lib "ADVAPI32.DLL" (ByVal strMachineName As String, ByVal strMessage As String, ByVal lngTimeout As Long, ByVal blnForceAppsClosed As Long, ByVal blnRebootAfterShutdown As Long, ByVal dwReason As Long) As Long
Private Sub Command1_Click()
InitiateSystemShutdown "", "", 0, True, True, 0
End Sub
Ben