Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I detect the DLLs required by an application?

Tags:

dll

winapi

In a nutshell: I want to do the same thing "Dependency Walker" does.

Is there any Win32 API function which can enumerate the dependencies of a EXE and/or DLL file?

And is there any safe way to detect dependencies on ActiveX classes? (I doubt it is possible, but who knows ...)

EDIT: I'm aware of available tools which provide the same core functionality (Dependency Walker, ProcessExplorer, AQTime, ...) but I want to create my own program which dumps a text file containing the required modules.

like image 693
Daniel Rikowski Avatar asked Dec 12 '08 12:12

Daniel Rikowski


1 Answers

User @blue... eluded to Dependency Walker. When using Dependency Walker, after opening the file you can see the base requirements that are used. Only when executing the program and exercising all of its functions can you find all of the dynamically-loaded DLLs.

Sometimes the best thing to do if you can is ask the developer what DLLs are required. An application may only load some DLLs when absolutely needed. e.g. Loading faultrep.dll, for custom Windows Error Reporting, when it is about to crash.

like image 50
Kris Kumler Avatar answered Oct 15 '22 09:10

Kris Kumler