I want to know what functions are available from a

2019-04-07 20:14发布

问题:

I have a DLL file that has some helpful functions I want to call in my application. Unfortunately I don't have the documentation for it any longer.

Is there any way I can discover what are the functions exported by the DLL and their method signature?

Maybe there's a utility that lists the functions and their arguments.

Know of any?

回答1:

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.



回答2:

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