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 8586489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:19:19+00:00 2026-06-11T22:19:19+00:00

I am programming a C/C++ PE Parsing library where I use DLL or exe

  • 0

I am programming a C/C++ PE Parsing library where I use DLL or exe to extract info about directories and headers. My prblem is when I extract the export address and get the address of functions, I don’t know how to use that address to point it to the array with the number of export functions exported

DWORD ExportRVA = PEHeader->optional.data_directory[0].virtual_address;
image_export_directory* Exports = (image_export_directory*)(RVAToOffset(ExportRVA)+BaseAddress);

ExportTable.nNames = Exports->number_of_names;
ExportTable.nFunctions = Exports->number_of_functions;
ExportTable.pFunctions = Exports->address_of_functions;
ExportTable.nNames = Exports->address_of_names;
ExportTable.pNamesOrdinals = Exports->address_of_name_ordinals;

Do I have to assign a pointer to array like

DWORD * AddrFunctions;

changing the pointer address?

  • 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-11T22:19:20+00:00Added an answer on June 11, 2026 at 10:19 pm

    The address_of_functions and address_of_names fields are RVAs to arrays of RVAs to the actual function entry points and names, respectively, whereas the address_of_name_ordinals field is an RVA to an array of WORD values, eg:

    #define RVAToPtr(RVA) ( ((LPBYTE)BaseAddress) + ((DWORD)(RVA)) )
    
    image_export_directory* Exports = (image_export_directory*) RVAToPtr(PEHeader->optional.data_directory[0].virtual_address); 
    
    ExportTable.nFunctions = Exports->number_of_functions; 
    ExportTable.nNames = Exports->number_of_names; 
    ExportTable.pFunctions = (PDWORD) RVAToPtr(Exports->address_of_functions); 
    ExportTable.pNames = (PDWORD) RVAToPtr(Exports->address_of_names); 
    ExportTable.pNamesOrdinals = (PWORD) RVAToPtr(Exports->address_of_name_ordinals); 
    
    for (DWORD i = 0; i < ExportTable.nFunctions; ++i)
    {
        void *FuncPtr = (void*) RVAToPtr(ExportTable.pFunctions[i]);
        char* FuncName = (char*) RVAToPtr(ExportTable.pNames[i]);
        WORD FuncOrdinal = ExportTable.Base + ExportTable.pNamesOrdinals[i]; 
        ...
    }
    

    Refer to MSDN for more details.

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

Sidebar

Related Questions

I am trying to follow a tutorial about xml parsing http://www.edumobile.org/iphone/iphone-programming-tutorials/parsing-an-xml-file/ . The tutorial
I am new to perl programming and would like to know about parsing text
I'm wondering if Scalas/Haskells parser combinators are sufficient for parsing a programming language. More
I have been reading about the continuation passing style programming technique (C# 3.0 implementation).
Programming is at the heart about automating tasks on a computer. Presumably those tasks
i dont have any experience in python programming but I get to run python
assuming that I know nothing about everything and that I'm starting in programming TODAY
I came across this File parsing programming challenge today and found it quite interesting.
Programming in C, are there any techniques one can use to avoid (or at
This is not programming quesion, but: Are there existing libaries for parsing XML, that

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.