Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find out API functions of DLL files?

Tags:

export

dll

winapi

Is there a way to get all the API (Export) functions from a DLL file?

I know that programs such as Depends and PE Explorer can do that but none of them retrieve the argument list.

like image 786
Kristina Brooks Avatar asked Nov 22 '25 08:11

Kristina Brooks


1 Answers

Unless the exported functions are something like a COM DLL or C++ with munging, the information simply isn't there to provide the arguments. It's normally possible to find the total size of the arguments, and there's a pretty decent chance that dividing by 4 will give something close to the right number, but beyond that it's down to manual labor, reading the assembly code to figure out how arguments are used.

If it's a COM DLL, it may include a type library that tells all about the contents of the DLL and how to use it. In this case, there will typically be only a very few exported functions to look at though -- you'll have to use COM to get at the real functionality.

If they're munged C++ names, then it'll depend on the compiler/toolset used to create the DLL. For example, if it was created with VC++, you can use UnDecorateSymbolName() to get the full name and arguments.

like image 158
Jerry Coffin Avatar answered Nov 24 '25 08:11

Jerry Coffin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!