Re: listing the data in a DLL
"King Coffee" <king.coffee@att.net> wrote in message
news:eeuYRBS4GHA.2424@TK2MSFTNGP06.phx.gbl...
Can you tell me how to list the Public functions and variables stored in a
DLL, if you have the DLL and LIB files?
Most of the time, the best you can do is to enumerate the names of the
exported functions in the DLL.
With the MS development tools, you use the binary dumper
dumpbin /exports YourDLLNameGoesHere.dll
Depending on the calling convention the exports may be "decorated" and the
decoration may give you some idea of the arguments to the functions.
Usually a name of the form
_foo@n
means that foo takes n bytes of parameters. C++ compilers decorate names to
include type information of arguments and return values but that is compiler
specific. With the MS compiler you can use the name undecoration utility
undname.exe
Some DLLs contain meta data that has the information you seek. For example
COM objects have type libraries and .Net assemblies make their meta-data
available to tools like the intermediate language disassembler - ildasm.exe
All of that said, it's a rare DLL for which you can glean everything you
need to know without either documenation or reverse engineering.
What do you need to do?
Regards,
Will