Anyone find any good examples of using VirtualQueryEx to search through a process's memory?
Printable View
Anyone find any good examples of using VirtualQueryEx to search through a process's memory?
Where did you run into VirturalQueryEx? I searched the API Viewer and two API web sites, and this is listed anywhere.
Hack - there are 5400 api's. VB people use about 800 of them.
This one is documented in platform SDK.
This api is documented only for C++ use. You will have to go to a PC that has VC++ installed and look up the header file that has the declaration for this.
The C++ version:
Code:DWORD VirtualQueryEx(
HANDLE hProcess, // handle to process
LPCVOID lpAddress, // address of region
PMEMORY_BASIC_INFORMATION lpBuffer, // information buffer
SIZE_T dwLength // size of buffer
);
typedef struct _MEMORY_BASIC_INFORMATION {
PVOID BaseAddress;
PVOID AllocationBase;
DWORD AllocationProtect;
SIZE_T RegionSize;
DWORD State;
DWORD Protect;
DWORD Type;
} MEMORY_BASIC_INFORMATION, *PMEMORY_BASIC_INFORMATION;
i found it in MSDN, its also in the API Txt Viewer.....
declaration:
Public Declare Function VirtualQueryEx Lib "kernel32" Alias "VirtualQueryEx" (ByVal hProcess As Long, lpAddress As Any, lpBuffer As MEMORY_BASIC_INFORMATION, ByVal dwLength As Long) As Long
... I just haven't found any good examples using it...