 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
emmmre How do I cheat?
Reputation: 0
Joined: 29 Oct 2021 Posts: 3
|
Posted: Fri Oct 29, 2021 7:35 am Post subject: C++ use dbk for WriteProcessMemory API |
|
|
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 |
|
|
Back to top |
|
 |
atom0s Moderator
Reputation: 204
Joined: 25 Jan 2006 Posts: 8580 Location: 127.0.0.1
|
|
Back to top |
|
 |
emmmre How do I cheat?
Reputation: 0
Joined: 29 Oct 2021 Posts: 3
|
Posted: Sun Oct 31, 2021 2:18 pm Post subject: |
|
|
atom0s wrote: | Drivers are not loaded with LoadLibrary... |
Thank you very much, I fixed issue with creating my own driver.
|
|
Back to top |
|
 |
syevale123 How do I cheat?
Reputation: 0
Joined: 28 Jan 2023 Posts: 2
|
Posted: Mon Apr 10, 2023 12:50 am Post subject: Thanks |
|
|
Your suggestion is very important for me. It is useful for my work . Thanks a lot.
|
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|