Home > Software engineering >  VB how to read other process memory data?
VB how to read other process memory data?

Time:10-04

The previous code has access to other program window HWND
Type the following code to read it a long data
Has passed the CE to get long data memory address is: 001529 BC
Why can't the following code to read data?

GetWindowThreadProcessId HWND, pid
PHandle=OpenProcess (PROCESS_ALL_ACCESS, False, pid)
If (pHandle=0) Then the Exit Sub
LRet=ReadProcessMemory (pHandle, & amp; H1529BC, lngTouZhuZhuang, 4, 0 & amp;)

Lret return value=0
The value of lngTouZhuZhuang=0

Please directly

CodePudding user response:

That's fine, can you give yourself?
LRet=ReadProcessMemory (pHandle, ByVal & amp; H1529BC, lngTouZhuZhuang, 4 & amp; , 0 & amp;)

CodePudding user response:

You don't put the function statement posted, who knows what is this error,
Examples of such as API - Guide, ReadProcessMemory inside the second parameter is declared as ByVal, originally you call that way is right,

CodePudding user response:

Use http://download.csdn.net/detail/caozhy/1859731 this debugging tool himself,
  •  Tags:  
  • API
  • Related