Skip to content

Instantly share code, notes, and snippets.

View Jackbail4's full-sized avatar

Jackbail4

  • Art of Cheats
  • United Kingdom
View GitHub Profile
#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,
#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);
}
#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);
}