Home > Software engineering > Vb traversal memory slowly what method (read repeatedly with ReadProcessMemory memory)
Vb traversal memory slowly what method (read repeatedly with ReadProcessMemory memory)
Time:10-29
The "1" in the search for a laptop from & amp; H000000 to & amp; HFFFFFF similar CE search
IhWnd=FindWindow (vbNullString, "1 - notepad") GetWindowThreadProcessId ihWnd, the iPid HProcess=OpenProcess (PROCESS_ALL_ACCESS, False, the iPid) For I="& amp; H "& amp; 0000000 To "& amp; H "& amp; FFFFFF ReadProcessMemory hProcess, I, ByVal adrValue, 10, 0 & amp; Next
But vb notepad "1" takes a few minutes in The ce memory viewer from & amp; H000000 to & amp; HFFFFFF only about 0.5 seconds
CodePudding user response:
One-time all read in an array, and then loop through,
You are so consumes a lot of function call overhead,