Results 1 to 4 of 4

Thread: VirtualQueryEx

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2001
    Posts
    109

    VirtualQueryEx

    Anyone find any good examples of using VirtualQueryEx to search through a process's memory?

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    Where did you run into VirturalQueryEx? I searched the API Viewer and two API web sites, and this is listed anywhere.

  3. #3
    jim mcnamara
    Guest
    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;

  4. #4

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

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