I have a DLL file that has some helpful functions I want to call in my application. I don't have the documentation for it any longer.
How can I discover which are the functions exported by the DLL and their method signature?
Is there any utility that lists the functions and their arguments?
The exports table of a DLL can be viewed by using the DUMPBIN tool with the /EXPORTS option. You can export functions from a DLL using two methods: Create a module definition (. def) file and use the .
Go to File and click Open and choose the dll that you want to decompile, After you have opend it, it will appear in the tree view, Go to Tools and click Generate Files(Crtl+Shift+G), select the output directory and select appropriate settings as your wish, Click generate files.
If a DLL is written in one of the . NET languages and if you only want to view what functions, there is a reference to this DLL in the project. Then doubleclick the DLL in the references folder and then you will see what functions it has in the OBJECT EXPLORER window.
A DLL helps promote developing modular programs. It helps you develop large programs that require multiple language versions or a program that requires modular architecture. An example of a modular program is an accounting program that has many modules that can be dynamically loaded at run time.
dumpbin /exports
(Dumpbin[1
] being a utility in the Windows SDK)
[1]
: http://msdn.microsoft.com/en-us/library/aa446532.aspx
Edit: BTW as I see 'interop' and '.NET' in the tags, don't forget Reflector and pinvoke.net. (Neither of these help with actual Win32 DLL exports of course.)
The windows SDK used to include the dependency walker GUI utility that can be used to explore DLL content:
Dependency Walker is a free utility that scans any 32-bit or 64-bit Windows module (exe, dll, ocx, sys, etc.) and builds a hierarchical tree diagram of all dependent modules. For each module found, it lists all the functions that are exported by that module, and which of those functions are actually being called by other modules. Another view displays the minimum set of required files, along with detailed information about each file including a full path to the file, base address, version numbers, machine type, debug information, and more.
Nowadays, it can be found here.
For method signature detail and creating inter-connection .NET
code, look for your DLL in the pinvoke site. You can also try their add-in to Visual Studio 2003 and 2005.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With