CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2001
    Posts
    51

    Listing ProcName in a DLL

    How do I get the names of all the functions within a DLL? Microsoft's "Depends" application does it, so I know it's possible.

  2. #2
    Join Date
    Feb 2000
    Location
    San Diego, CA
    Posts
    10,354

    Re: Listing ProcName in a DLL

    You need to know the file format for the dll. It is called Portable Executable format ( PE in short ). The exports of a dll are kept in a table called the export table. And there is a specific structure. Please google for "PE format" and you should be able to find resources. There is an article by Matt pietrek which is a good read.

  3. #3
    Join Date
    Nov 2004
    Location
    Virginia, The lovers' state
    Posts
    64

    Re: Listing ProcName in a DLL

    Yup, Kirants is right on the mark, as usual...

    It was one of my favorite articles from one of my favorite authors - Matt P

    Here is the source code for his version of depends.

    Hope this helps.

    -Vinayak
    Attached Files Attached Files

  4. #4
    Join Date
    May 1999
    Location
    ALABAMA, USA
    Posts
    9,917

    Re: Listing ProcName in a DLL

    You can also use DUMPBIN or Link utility without knowing anything about specific formats or protocols.
    Creating process for running hidden DUMPBIN and redirecting it to a pipe would allow retrieving information about exports and more by reading pipe buffer and parsing strings.
    There are only 10 types of people in the world:
    Those who understand binary and those who do not.

  5. #5
    Join Date
    May 1999
    Location
    ALABAMA, USA
    Posts
    9,917

    Re: Listing ProcName in a DLL

    Something like this: (Still working on it.)
    Attached Files Attached Files
    There are only 10 types of people in the world:
    Those who understand binary and those who do not.

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

Featured