Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
The api call looks like this
Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
My code looks like this
dim str as stringReadProcessMemory pHandle, BaseAddress,str, 1, 0&
Text1.text = strIt is supposed to simply read the address of what is written in a notepad file, all of the declrations are correct to get the handle and the base address, I know this becuase I wrote a similar chunk of code using writememoryprocess and it WORKED. I think the problem exists somewhere in the lbuffer part of the call.

==================================================================
The way you have it, it is declared as a statement rather than an assignment/function. Try it this way:ReadProcessMemory(pHandle, BaseAddress,str, 1, 0 & Text1.text)=str
Also, pHandle is being passed to a variable reference byRef rather than byVal...you may want to check the rest of these and look for similar trouble.
borelli35

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |