Reputation: 29
ReadProcessMemory(hProc,(LPCVOID)(7845CDDC),&PHP,4,NULL);
When I enter that i get this error in Dev-C++ Win32 :
C:\Dev-Cpp\main.cpp invalid suffix "CDDC" on integer constant
any idea why?
Upvotes: 0
Views: 949
Reputation: 4225
ReadProcessMemory should have the lpBaseAddress parameter as a pointer to the base address in the specified process from which to read. The problem with "7845CDDC" is that it is a Hex value (should be 0x7845CDDC), but you can enter the value as an Decimal as well (will be 2017840604).
So you can call:
ReadProcessMemory(hProc,(LPCVOID)(2017840604),&PHP,4,NULL);
Upvotes: 0
Reputation: 37945
You probably want a hex constant, that is to say 0x7845CDDC
.
ReadProcessMemory(hProc,(LPCVOID)(0x7845CDDC),&PHP,4,NULL);
Upvotes: 8