Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to list available methods in a Win32.DLL

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?

like image 706
Cyril Gupta Avatar asked Mar 03 '09 06:03

Cyril Gupta


People also ask

How do I see exported functions in a DLL?

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 .

How do you open .dll files to see what is written inside?

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.

How can I see what methods are in a DLL?

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.

What functions are in a DLL?

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.


2 Answers

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.)

like image 101
Ruben Bartelink Avatar answered Sep 28 '22 07:09

Ruben Bartelink


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.

like image 36
gimel Avatar answered Sep 28 '22 05:09

gimel