 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
kkid28 Expert Cheater
Reputation: 0
Joined: 30 Sep 2006 Posts: 110 Location: The only flat part of the planet.
|
Posted: Sun Jan 07, 2007 2:37 pm Post subject: More C++ troubles... |
|
|
Ok, I've gotten the program to work using the address I get in CE but when I try to use the pointer it fucks up. Someone please help!
Code: | WriteMemBalls("3D Pinball for Windows - Space Cadet",(unsigned long*)0x01025040+0x146,x); |
The function mentioned there sends it to this:
Code: | void WriteMemBalls(char* window, LPCVOID address, int value)
{
HWND hWnd = FindWindow(0, window);
DWORD proc_id;
GetWindowThreadProcessId(hWnd, &proc_id);
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, proc_id);
BYTE newdata[]={value};
DWORD newdatasize = sizeof(newdata);
WriteProcessMemory(hProcess, (void*)address, &newdata, newdatasize, 0);
CloseHandle(hProcess);
} |
The line I'm referring to is the 3rd one from the bottom, WriteProcessMemory(etc...)
_________________
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25787 Location: The netherlands
|
Posted: Sun Jan 07, 2007 4:22 pm Post subject: |
|
|
0x01025040+0x146=0x1025186 , so you'll be writing to address 0x1025186
I think you actually want 0x01025040 as base pointer and the offset to be 0x146, so...
change
Code: |
WriteMemBalls("3D Pinball for Windows - Space Cadet",(unsigned long*)0x01025040+0x146,x);
|
into
Code: |
WriteMemBalls("3D Pinball for Windows - Space Cadet",(unsigned long*)0x01025040,0x146,x);
|
change
Code: |
void WriteMemBalls(char* window, LPCVOID address, int value)
|
into
Code: |
void WriteMemBalls(char* window, LPCVOID address, int level0offset, int value)
|
then change the code of the function to read the address provided by 'address' , increase that value with level0offset, and then writeprocessmemory to the resulting address
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
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
|
|