当你的朋友发现自己的屏幕成蓝屏,会发生什么样的反应?
“啊,我的电脑有木马啦!”
like this?
呵呵。今天就有我带着各位,制作一个蓝屏模拟器。
代码不长,而且很容易理解。
点关注,不迷路!
#include#include using namespace std; void full_screen() { HWND hwnd = GetForegroundWindow(); int cx = GetSystemMetrics(SM_CXSCREEN); int cy = GetSystemMetrics(SM_CYSCREEN); LONG l_WinStyle = GetWindowLong(hwnd,GWL_STYLE); //获取窗口信息 SetWindowLong(hwnd,GWL_STYLE, (l_WinStyle | WS_POPUP | WS_MAXIMIZE) & ~WS_CAPTION & ~WS_THICKframe & ~WS_BORDER); SetWindowPos(hwnd, HWND_TOP, 0, 0, cx, cy, 0); } void HideTheCursor() { CONSOLE_CURSOR_INFO cciCursor; HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); if(GetConsoleCursorInfo(hStdOut, &cciCursor)) { cciCursor.bVisible = FALSE; SetConsoleCursorInfo(hStdOut, &cciCursor); } } int main() { system("mode 96,28"); HANDLE hStdin = GetStdHandle(STD_INPUT_HANDLE); DWORD mode; GetConsoleMode(hStdin, &mode); mode &= ~ENABLE_QUICK_EDIT_MODE; SetConsoleMode(hStdin, mode); HideTheCursor(); CONSOLE_FONT_INFOEX cfi; cfi.cbSize = sizeof cfi; cfi.nFont = 0; cfi.dwFontSize.X = 15; cfi.dwFontSize.Y = 30; cfi.FontFamily = FF_DONTCARE; cfi.FontWeight = FW_NORMAL; wcscpy(cfi.FaceName, L"MS Gothic"); SetCurrentConsoleFontEx(GetStdHandle(STD_OUTPUT_HANDLE), FALSE, &cfi); system("color 1f"); RECT rect; HWND hwnd=GetForegroundWindow(); GetWindowRect(hwnd,&rect); MoveWindow(hwnd,-30,-7,8600,1080,TRUE); full_screen(); cout<<"A problem has been detected and windows has been shut down to prevent damagen to your computer.nn DRIVER_IROL_NOT_LESS_OR_EQUALnn If this is the first time you've seen this Stop error screen, n restart your computer.If this screen appears again, follow n these steps:nn Check to make sure any new hardware or software is properly installed.n If this is a new installation, ask your hardware or software manufacturern for any windows updates you might need.nn If problems continue. disable or remove any newly installed hardwaren or software. Disable BIOS memory option such as caching or shadowing.n If you need to nsu Safe Mode to remove or disable components, restartn your computer, press F8 to select Advanced Startup Options, and thenn select Safe Mode.nn Technical information:n """STOP:0x00000050(0xFD3094c2,0x00000001,0xFBFE7617,0x00000000)nn """SPCMDON.SYS - Address FBFE7617 base at FBFE5000, DateStamp 3d6dd67c"< 是否非常的简单?
友情提示:复制代码虽简单,但理解更重要。这样,你就能自己编写代码啦!



