Programmatically examine DLL contents

Posted by Peter Hansen on Stack Overflow See other posts from Stack Overflow or by Peter Hansen
Published on 2010-03-24T17:55:38Z Indexed on 2010/03/24 19:33 UTC
Read the original article Hit count: 1563

Filed under:
|
|

Is it possible programmatically to discover the exported names (globals, entry points, whatever) in a Windows DLL file without implementing a parser for the binary executable file format itself?

I know there are tools to do this (though no open source ones I've found), but I'm curious whether there is a Windows API to accomplish the same thing or whether such tools operate merely by examining the binary file directly.

I suspect there is an API for .NET libraries: if that's the case then is there a similar one for native DLLs?

Edit: http://stackoverflow.com/questions/1128150 is basically an exact duplicate. The answer there is roughly "there is no API, but you can hack it using LoadLibraryEx() and navigating a few resulting data structures".

Edit: I was able to use the accepted answer at http://stackoverflow.com/questions/1128150 to create a quick DLL dumper with Python and ctypes that works.

© Stack Overflow or respective owner

Related posts about dll

Related posts about Windows