by Roderick Thompson (12 Submissions)
Category: Encryption
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 1st March 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
If a users attempts to shutdown/restart their computer while your application is still running, this simple piece of code will actually allow
API Declarations
Declare Function AbortSystemShutdown Lib "advapi32.dll" Alias "AbortSystemShutdownA" (ByVal lpMachineName As String) As Long
Function GetName()
Dim lpBuff As String * 25
Dim ret As Long, ComputerName As String
ret = GetComputerName(lpBuff, 25)
ComputerName = Left(lpBuff, InStr(lpBuff, Chr(0)) - 1)
GetName = ComputerName
End Function
AbortSystemShutdown (GetName)
End Sub
No comments have been posted about If a users attempts to shutdown/restart their computer while your application is still running, thi. Why not be the first to post a comment about If a users attempts to shutdown/restart their computer while your application is still running, thi.