rudimenter
rudimenter

Reputation: 3440

How to find out which Win API functions are called from a compiled c/c++ dll

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.

Upvotes: 2

Views: 4887

Answers (6)

user2806369
user2806369

Reputation: 35

Ida Pro, The universally accepted disassembler. It has seperate tab for Import and Export Function.It has several other uses in the field of reverse engineering.

Upvotes: 0

myeviltacos
myeviltacos

Reputation: 113

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.

Upvotes: 0

Santosh kumar
Santosh kumar

Reputation: 352

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.

Upvotes: 0

tenfour
tenfour

Reputation: 36896

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.

Upvotes: 12

ChrisW
ChrisW

Reputation: 56083

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.

Upvotes: 3

ur.
ur.

Reputation: 2947

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

Upvotes: 2

Related Questions