How to dynamically load modules (static) programmatically in windows

I am trying to connect the unix ldd utility to windows because walker walker and cygcheck don't give me what I'm looking for. (also for training)

I've looked all over MSDN, for the windows API, which lists the DLL's dependencies on the executable, or even the storage format in the executable exe (just to filter it), but I couldn't find anything.

If anyone knows which API call windows are used to load modules for loading, or what templates I can find in the executable to find modules to load, please help me :) thanks!

-number: I'm not looking for a profile for dynamic modules, just list the ones required at runtime

+2


a source to share


3 answers


Modules loaded by loadlibrary api cannot be found in the exe import table. Therefore, to track this module, we must use one of several api monitoring tools. http://www.rohitab.com/apimonitor

www.apimonitor.com

If not, you can just get all imports from



dumpbin / import abc.exe

(I'm not entirely sure about the command line syntax)

dumpbin is a tool from windows sdk (visual studio contains it too)

+2


a source


Personally, before I spent a lot of time figuring out the (probably complex) API calls to do this, I would consider running Dependency Walker in console mode and see if I can just fetch the text data I need.



+1


a source


Useful links:

PE COFF Spec

Disassembling X86 / Windows executables

MSDN Magazine Article Part 1

MSDN Magazine Article Part 2

Your area of ​​interest will usually import a directory. These two can also be helpful:

Tool Help Library

Debug reference library

+1


a source







All Articles