- Home
·
- Encryption
·
- If a users attempts to shutdown/restart their computer while your application is still running, thi
If a users attempts to shutdown/restart their computer while your application is still running, thi
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
Rate If a users attempts to shutdown/restart their computer while your application is still running, thi
(2(2 Vote))
AbortSystemShutdown (GetName)
End Sub
If a users attempts to shutdown/restart their computer while your application is still running, thi Comments
No comments yet — be the first to post one!
Post a Comment