|
-
Dec 28th, 2001, 05:49 AM
#1
Thread Starter
Lively Member
Problem with ReadProcessMemory
this is a snippet of my code...
----------
For MemRegion = baseAddr To endAddr Step 4096
RetVal = ReadProcessMemory(hProcess, MemRegion, ReadBuffer, 4096, 0&)
If RetVal Then
FoundLocation = InStr(ReadBuffer, SearchString)
If FoundLocation Then Exit For
End If
Next MemRegion
----------
readbuffer is dimed as ..... "Dim ReadBuffer As String * 4096" .... everything else is fine....
what im trying to do is read 4kb (default pagefile size) chunks of memory.... and im looping through a start and end address. those i get with virtualqueryex, and that works fine, but when i use the loop above, vb crashes... something with the readprocessmemory isnt correct...... whats wrong? .. you SHOULD be able to read 4kb chunks, right?
-
Dec 28th, 2001, 11:27 PM
#2
Thread Starter
Lively Member
ugh, found out it was because readprocessmemory was declared wrong... everywhere i go, its declared differently. i corrected it, now its fine
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|