Hi guys,
I'm trying to read some values off the d3 process. I've located the base address of the game via the getBaseAddress function. The problem is that I'm not reading any data, value stays a constant, and data read = 0. It doesn't matter what offset I give to the baseAddr. Thank you in advance!
Code:
...
cout << "Handle success...\n";
DWORD baseAddr = getBaseAddress(processId, _T("Diablo III"));
printf("Base Address: 0x%p\n", baseAddr);
float hp = 0;
//void* value; // pointer to the current location
DWORD value;
unsigned int count = 4096;
SIZE_T read = 0;
DWORD baseAddrOffset = baseAddr + 4;
ReadProcessMemory(hProcessHandle, (LPCVOID)(baseAddrOffset), &value, count, &read);
printf("Memory Address: 0x%p\n", baseAddrOffset);
cout << "Value: " << value << endl;
cout << "Read: " << read << endl;