OK I HAVE SOLVED, THANK TO ALL :D
yes 0x20Quote:
Well, I guess your DLL is injected into the target process? Then you don't need to get a handle for the process or use OpenProcess.
One way would be memcpy(address, value, sizeof(value)), another way:
DWORD *ptr = 0x004DE898;
DWORD *secondptr = *ptr + 20; /* sure that it's 20 or is it 0x20? */
value = *secondptr;
Don't know which way is better. ¯\_(ツ)_/¯
private: System::Void button17_Click(System::Object^ sender, System::EventArgs^ e) {
HANDLE phandle;
DWORD *ptr = 0x004DE898;
DWORD *s_ptr = *ptr + 0x20;
int value = *s_ptr;
ReadProcessMemory(phandle, (LPVOID)value, &value, 4, 0);
label14->Text = System::Convert::ToString(value);
}
}
Well then you need to write 0x20, not 20 if it is 0x20.Quote:
yes 0x20
But first of all. Like snow911 already said. Do you inject your dll into the game-process which contains the code you posted above, or is this an external hack which uses Read- / WriteProcessMemory()?Quote:
ReadProcessMemory(phandle, (LPVOID)(value+0x20), &value, 4, 0);
Why would you use ReadProcessMemory to read in the own addressspace [IMG]http://www.*************.me/forum/images/smilies/jackie.gif[/IMG]Quote:
Ehm, i inject DLL in game process, i need read from memory the value of pointer ( 0x004DE898 + 0x20 )
DWORD value = *(DWORD*)(*(DWORD*)0x4DE898 + 0x20);