tags:

views:

593

answers:

5

If I have a Windows executable, how can I find out which dlls it will load?

I'm just talking about which ones that will be loaded statically, not ones it might load dynamically with something like LoadLibrary.

+6  A: 

There are utilities that will do this for you.

In the past I've used the MS tool (depends.exe) that came with (I think) VB.:
http://msdn.microsoft.com/en-us/library/8kche8ah(VS.71).aspx

and there's this as well:
http://dependencywalker.com/

and probably others as well.

gkrogers
+1  A: 

Dependency Walker can help you determine which .dll will be loaded.

David Segonds
A: 

progfr is simple and useful: [http://members.fortunecity.com/michaelmoser/tip11.htm]

+2  A: 

dumpbin is a tool that comes with VC++. To see what functions (and DLLs) it will import, use

C:\> dumpbin /imports whatever.exe
Graeme Perrow
I believe it should be: dumpbin /dependents whatever.exe
lz_prgmr
/dependents only shows you the DLLs. /imports shows you functions *and* DLLs.
Graeme Perrow
+1  A: 

There is a handy tool called NDepend that will give you all DLL dependencies.

FlySwat