This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <cstdint> | |
void DisplayError(DWORD ErrCode) { | |
const char* msg; | |
FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, 0, ErrCode, 0, (char*)&msg, 0, 0); | |
MessageBoxA(0, msg, "Problem", MB_OK); | |
exit(0); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <Windows.h> | |
typedef BOOL(_stdcall* tBeep)(DWORD dwFreq, DWORD dwDuration); | |
tBeep oBeep; | |
BOOL hkBeep(DWORD dwFreq, DWORD dwDuration) { | |
printf("Beep was called\ndwFreq: %i dwDuration: %i\n", dwFreq, dwDuration); | |
return oBeep(dwFreq, dwDuration); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <Windows.h> | |
#include <DbgHelp.h> | |
#pragma comment(lib, "Dbghelp.lib") | |
//Run as x64 | |
int main() { | |
HANDLE hFile = CreateFileW(L"C:\\Users\\jackb\\Desktop\\cum.sys", GENERIC_ALL, 0, nullptr, |