C++ how to find last (offset - adress) used in processmemory with use readprocessmemory -


i use code readprocessmemory :

  bool winapi readprocessmemory(     _in_  handle  hprocess,     _in_  lpcvoid lpbaseaddress,     _out_ lpvoid  lpbuffer,     _in_  size_t  nsize,     _out_ size_t  *lpnumberofbytesread     ); char value[5];  handle hprocess = openprocess(process_all_access, 0, 6500); {     readprocessmemory(hprocess, (lpvoid)105477, value, 5, 0); } 

its work 100%

but want know how know last offset used in processmemory - before read it

see picture : enter image description here

the last offset in processmemory 7ffe0fff - how can before read processmemory

well may work if absolutely sure can read memory of other process... anyway quite dangerous method, there better ipc apis these things!

unless writing debugger yourself... in fact readprocessmemory cited here "process functions debugging" https://msdn.microsoft.com/it-it/library/windows/desktop/ms680549(v=vs.85).aspx


Comments