readprocessmemory to read contents of specific (other process) memory address.
-
I have been searching for days, but I just can't seem to make heads or tails of anything google brings up. Here's my situation, I need a quick and dirty program that can read the contents (string) of a specific memory address of a separately running process. I have it to the point where I can find the window I need via hwnd/findwindow, I can associate the processID, but everytime I dive into readprocessmemory I just can't make it work. Any help is greatly appreciated. Thanks! PS - VB6, not VB.net -Brian Nelson (Arokh)
-
I have been searching for days, but I just can't seem to make heads or tails of anything google brings up. Here's my situation, I need a quick and dirty program that can read the contents (string) of a specific memory address of a separately running process. I have it to the point where I can find the window I need via hwnd/findwindow, I can associate the processID, but everytime I dive into readprocessmemory I just can't make it work. Any help is greatly appreciated. Thanks! PS - VB6, not VB.net -Brian Nelson (Arokh)
The first thing you have to to is make sure that the process handle you get (NOT the same as the processID!) has PROCESS_VM_READ rights. You can do that with a call to GetSecurityInfo. The docs for GetSecurityInfo are here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/security/security/getsecurityinfo.asp[^] RageInTheMachine9532