export tables

Started by
2 comments, last by Enigma 18 years, 7 months ago
How would one manually locate and read an export table in any .dll, .exe, or .lib file regardless of what compiler it was created with?
Advertisement
You can use a program like tdump32 or dumpbin, that usually comes with your compiler to get the exports from a .dll or .exe. Getting the exports from a .lib may be difficult if you don't have a version for the .lib's format (OMF or COFF).
Yes, I've done this.

My intention was to load the file into memory and
locate/piece together the table from that point.
I'm looking for offsets to the actual procedure
associated with that name.

I normally use GetProcAddress() for this, but
that requires I use only Winows DLLs and EXEs for everything
and start them up as separate processes (very ugly looking in task manager).
The type of data I intend to load isn't really worth an entire process
by itself.

My goal is, primarily, to create a means of making a "plugin"
with any compiler and loading it without asking Windows.
(This, mostly because I'm curoius. Or perhaps I'm crazy...)
Check out this document. It documents the PE executable format and includes all the information you need (and by downloading it you automatically enter a "covenant not to sue" with Microsoft!).

Enigma

This topic is closed to new replies.

Advertisement