VB traversal memory slowly what method (ReadProcessMemory read memory)

For example, search the notebook in the "1" from H000000 to & & HFFFFFF CE like search

ihWnd = FindWindow(vbNullString, "1 - Notepad")
GetWindowThreadProcessId ihWnd, iPid
hProcess = OpenProcess(PROCESS_ALL_ACCESS, False, iPid)
For i = "&H" & 0000000 To "&H" & FFFFFF
ReadProcessMemory hProcess, i, ByVal adrValue, 10, 0&
Next


But VB find NOTEPAD "1" take a few minutes
The CE memory viewer from the & H000000 & HFFFFFF takes only 0.5 seconds to do

Started by Michelle at February 07, 2016 - 3:29 AM

All read into the array, and then recycling search.

The way you consume a lot of function call overhead.

Posted by Wendy at December 24, 2016 - 12:21 AM

To repeat, you call the For ReadProcessMemory hProcess is the cycle time.

Posted by Maureen at December 27, 2016 - 12:29 AM

Khan, what is the relationship between it and VB speed, only algorithm problem you read memory. You realized by ReadProcessMemory, a read N megabytes to array is appropriate.

Posted by Yale at January 07, 2017 - 1:57 AM

A)A block read
B)Looks like with KMP algorithm

Posted by April at January 10, 2017 - 12:49 AM

For example? ? ? ? ? ?

Posted by Michelle at January 10, 2017 - 1:15 AM

..........
For i = "&H" & 0000000 To "&H" & FFFFFF
ReadProcessMemory hProcess, i, ByVal adrValue, 10, 0&
Next

A program memory, 100% cases without I = "&H" & 0000000 To "&H" & FFFFFF
The address range are occupied

The program's memory, is the realization of reactor concept

Can be understood as a tree like structure

The process is the top node, the secondary node is all the memory heap
Have different meaning in different memory storage of data, some is stored code, some is to save resources and some is stored user data

so. . .
You should find some task manager code, the enumeration process all the heap, all heap significance analysis
For those who may be the memory range corresponding data stored in re search, range, speed up, don't superstitious so-called algorithm

Posted by Yvonne at January 14, 2017 - 2:43 AM