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.
Printable View
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.
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.
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
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.
Something like this: (Still working on it.)