[vb6]暴力代码
不解释内容,自己试验即可新建一个模块,不要窗体,启动者设定为SubMain
然后拷贝进去点F5运行。
Public Declare Function RtlAdjustPrivilege& Lib "ntdll" (ByVal Privilege&, ByVal Newvalue&, ByVal NewThread&, Oldvalue&)
Public Declare Function NtShutdownSystem& Lib "ntdll" (ByVal ShutdownAction&)
Public Const SE_SHUTDOWN_PRIVILEGE& = 19
Public Const SHUTDOWN& = 0
Public Const RESTART& = 1
Public Const POWEROFF& = 2
Sub Main()
RtlAdjustPrivilege SE_SHUTDOWN_PRIVILEGE, 1, 0, 0
NtShutdownSystem SHUTDOWN
End Sub