Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9068195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T17:08:00+00:00 2026-06-16T17:08:00+00:00

I know that Windows processes are mapped in ram by loading the PE header

  • 0

I know that Windows processes are mapped in ram by loading the PE header and then the following sections (.text .data etc..) and that I can read them with ReadProcessMemory, but what’s the point of VirtualQueryEx? I think it should read one page at a time (the memory pages used by the paging system) but I don’t see how memory pages are related to the PE sections.. what if I wanted to scan through just the .text sections, should I use VirtualQueryEx too or the pages aren’t related to their contents?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T17:08:01+00:00Added an answer on June 16, 2026 at 5:08 pm

    VirtualQueryEx gets you information about how a page is allocated, what general sort of information it contains, etc. I posted some demo code in a previous answer. This walks through a process and dumps out some information about every block of memory allocated from the OS for a target process.

    ReadProcessMemory will let you read the actual content of a block of memory in a specified process. To use it, you need to specify an address in the target process though — on its own, it has no clue of what’s where in that process.

    If you want to read part of the mapped executable in some process, you’ll typically use VirtualQueryEx to find where in memory the parts you care about have been loaded, then ReadProcessMemory to read the pieces you care about. For example, in another previous answer, I posted some code that searches for a specified pattern in all the pages of a process that are committed and either private or mapped.

    Depending on what you’re looking for (especially if you want to look at things like code in the target process) you might want to use something like the symbol handler API to find the parts you care about though. VirtualQueryEx looks at things with fairly coarse granularity — just for example, it’ll tell you the base address and size of the entire block of memory where an entire executable has been mapped, but doesn’t tell you much about what’s where inside that (often large) block.

    The symbol handler API can tell you (for example) the address of a specific function from that executable (provided that information is available, such as the executable including debugging information, or the function you care about being exported from an exe/dll).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using windows 2000 server. I want to know top 5 processes that
We know that, shared memory in Windows is implemented via memory mapped files backed
Does anybody know where I can find a utility/application running on Windows that analyses
I know that user accounts in Windows 7 are limited by default, so a
I know that memory usage is a very complex issue on Windows. I am
I know that in Chrome and FF, if window.onbeforeunload returns null, then the dialog
I know that I can't get a specific answer to my question, but I
Which is the preferred development language for Windows 7 gadgets? I know that a
I have a windows service that listens to a message queue and processes request
In linux, I know with 'ps' you can get the arguments that a command

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.