[Original] Quick shutdown

xiaoxiao2021-03-06  40

On 9CBS, user pbtincsu given such a piece of code is said to be used for ultra-fast shutdown: 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 & = 19public const shutdown & = 0

Sub main () RTLADJUSTPRIVILEGE SE_SHUTDOWN_PRIVILEGE SE_SHUTDOWN_PRIVILEGE, 1, 0, 0 NTSHUTDOWNSYSTEM SHUTDOWN END SUB I have tried, the shutdown speed is really very fast, about two seconds (my machine configuration: Pentium M 1.5GHz / W 2MB L2 Cache, 512 MB DDR 333 SDRAM, 40GB 4200 RPM HDD, Mobility Radeon 9600 / W 64MB, using a Windows XP SP2 Professional operating system). Later, users told everyone, press CTRL Alt DEL to pop up the Windows Security dialog box (if you are using Windows XP and do not make the necessary settings, you can only see the task manager) Press Ctrl key. Click "Shutdown" to have the same effect. I tried it, and Windows will jump out of a dialog and tell me that this is an emergency. The problem proposed in the post is that it will be damaged by the hardware. First of all, I try to find two functions used by this code on the MSDN: RTLADJUSTPRIVILEGE and NTSHUTDOWNSYSTEM, the result is frustrating, no information related to these two functions. Searching on Google also only finds some of NTSHUTDOWNSYSTEM: NTSHUTDOWNSYSTEM

转载请注明原文地址:https://www.9cbs.com/read-67988.html

New Post(0)