Results 1 to 2 of 2

Thread: Problem with ReadProcessMemory

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2001
    Posts
    109

    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?

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Aug 2001
    Posts
    109
    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
  •  



Click Here to Expand Forum to Full Width