emmmre How do I cheat? Reputation: 0
Joined: 29 Oct 2021 Posts: 3
|
Posted: Fri Oct 29, 2021 1:57 pm Post subject: C++ use dbk.sys for WriteProcessMemory |
|
|
Hello,
Trying to edit memory which guarding with Game guard game.
I can't edit memory when default settings with C.E.
But When I change the Debugging Options->Use windows debugger to use kernelmode driver (Requires DBVM), I can successfully change the memory.
I want to code in C++.
WriteProcessMemory fails, GetLastError returns 5 which is ACCESS_DENIED.
So I want to use dbk32.sys (Cheat Engine's file) to write memory.
But GetProcAddress returns 0.
Need Help, Thanks.
My C++ Code:
Code: | typedef HANDLE(__stdcall* OPfunc)(DWORD dwDesiredAccess, BOOL bInheritHandle, DWORD dwProcessId);
typedef bool(__stdcall* WPMfunc)(HANDLE hProcess, LPVOID lpBaseAddress, LPCVOID lpBuffer, SIZE_T nSize, SIZE_T* lpNumberOfBytesWritten);
HINSTANCE ce_hDLL = LoadLibrary("C:\\Program Files\\Cheat Engine 7.3\\dbk32.sys");
if (ce_hDLL == NULL) { // there is no error, loads sys file successfully
MessageBoxA(0, "Error! Couldnt Load dbk32.dll! Quiting.", "ERROR!", MB_ICONINFORMATION);
return 7;
}
OPfunc OP;
OP = (OPfunc)GetProcAddress(ce_hDLL, "OP"); // HERE IS THE FAIL. 0
WPMfunc WPM;
WPM = (WPMfunc)GetProcAddress(ce_hDLL, "WPM"); // THIS TOO 0 |
|
|