tags:

views:

127

answers:

5

Hi

I have a compiled C/C++ Dll.

I would like to know which external API function is called by this Dll.

Do you know any tools which can provide these informations.

Thanks.

+2  A: 

Dependency Walker (depends.exe) will be your friend.

ur
+3  A: 

Use the dumpbin utility with the /imports command-line option. There's also a depends.exe utility which as a GUI.

Beware that these won't tell you about functions which you link to use GetProcAddress, nor about interfaces which you access via COM.

ChrisW
+10  A: 

You can use Dependency Walker to see API imports of a DLL. Of course that doesn't tell you if the DLL does dynamic loading, or COM usage.

Next to that you could use the much heavier logexts extension to windbg, which will dump all API calls at runtime.

tenfour
Dependency Walker will also tell you about the dynamically loaded imports. But for that to work, you need to run an application that uses the DLL and invokes the propper code paths that do the loading.
Frank Bollack
A: 

What does mean by external API(are you considering WINAPI as an external API ?). if windows API is not an external API then we can use to DumpBin.exe to display all external api used in the binary. if you want to see the dependent dll/exe of an executable then you can use Depend.exe.

Santosh kumar
A: 

AFAIK, dependency walker only shows functions that are called directly, not the ones that are called via function pointers. If you want to find all the APIs that are called, log all the calls to GetProcAddress.

myeviltacos