Reading pointers incorrectly
I'm trying to read a pointer that points to a float value. This pointer is only 1 level, Static address +offset
I first nabbed access to my window
OpenProcess(PROCESS_ALL_ACCESS, FALSE, pId);
I named the pointer value "Base"
ReadProcessMemory(Procy, (PBYTE*)0xblahblah , &Base, sizeof(DWORD), NULL);
Here I landed on the pointer, so I wish to move down 284 bytes in memory to reach a float value
ReadProcessMemory(Procy, (PBYTE*)(Base + 284), &Curr, sizeof(float), NULL);
I'm using cout to debug
cout << Curr << endl; //This reads the value is -1 which is incorrect
It's probably extremely easy to notice but I'm not seeing it, such a simple task and it's giving me a headache
Thanks for reading
Oh, of course, I was adding 284 instead of 0x284 to the base.
This thread can be closed, i solved it myself
Last edited by kaz; 11-12-2013 at 11:12 PM.
Post Thanks / Like - 1 Thanks
thanked for this post