Link to home
Start Free TrialLog in
Avatar of SonicX_BlueBlur
SonicX_BlueBlur

asked on

Reading .EXE dependencies

Is there a way to read the dependencies from an executable file?
Avatar of rcarlan
rcarlan

Do you mean programmatically, or with a tool?

Depends.exe (included with Visual Studio) will show all static dependencies (DLLs linked at build time).

However, the executable may also have dynamic dependencies (e.g. DLLs loaded manually at runtime, COM servers instantiated through code, etc).
There is no tool to discover these, but you may use something like Process Explorer (http://www.sysinternals.com/ntw2k/freeware/procexp.shtml) to monitor the various modules loaded by the executable at runtime. Of course, it will only show modules actually loaded. So, if you do not exercise a certain code path that would result in the loading of an external module, it will not show up.

Radu
Avatar of SonicX_BlueBlur

ASKER

Programmatically, actually. I'm making an installer, and part of it is a script creator (as the installer is script-based). In my view, the creator of the program shouldn't have to deal with dependencies defined by the program itself, just the ones they define themselves.
ASKER CERTIFIED SOLUTION
Avatar of rcarlan
rcarlan

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry about giving a C, but that was just too much documentation for me to go through, with everything else I need to do. I'll keep it in mind, though.