VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

If a users attempts to shutdown/restart their computer while your application is still running, thi

Roderick Thompson  (12 Submissions)   Encryption   VB 6.0   Unknown Difficulty   Thu 1st March 2001   Mon 8th February 2021

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))
If a users attempts to shutdown/restart their computer while your application is still running, thi.bas

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

0/1000 characters