Tools to work with Microsoft Portable Executable (PE) files:
- pe-depends: list and copy dependencies of
.exe
or.dll
files - dll-finder: search for a
.dll
file - pe-info: print information of
.exe
or.dll
files
List and / or copy dependencies of .exe
or .dll
files.
pe-depends [--list | --direct | --copy] [-n] [-w <path>] [-t <dir>]
[-k <dll>] [-p path] <exe_or_dll>...
Long Option | Short Option | Description |
---|---|---|
--list |
-l |
list dependencies recursivly |
--direct |
-d |
list direct dependencies only |
--copy |
-c |
copy dependencies to target directory |
Long Option | Short Option | Argument | Description |
---|---|---|---|
--work-dir |
-w |
PATH | change working directory |
--target |
-t |
PATH | target directory for copy command (default: .) |
--known |
-k |
FILE | add known DLL (can be specified multiple times) |
--path |
-p |
PATH | add search Path (can be specified multiple times) |
--no-default |
-n |
- | disable default search order (see below) |
Search for a .dll
file.
dll-finder [-n] [-w <path>] [-t <dir>] [-k <dll>] [-p path] <dll>...
Long Option | Short Option | Argument | Description |
---|---|---|---|
--work-dir |
-w |
PATH | change working directory |
--known |
-k |
FILE | add known DLL (can be specified multiple times) |
--path |
-p |
PATH | add search Path (can be specified multiple times) |
--no-default |
-n |
- | disable default search order (see below) |
Print information of .exe
or .dll
files.
pe-info <exe_or_dll>...
A known DLL is a DLL that is well known by the system and therefore not copied to the target directory. Windows manages a list of known DLLs in registry (see
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\KnownDLLs
).
Use the -k
option to add extra known DLLs.
Use the -n
option to ignore registry (extra known DLLs will still be used).
The default search order is roughly oriented at DLL search order (see https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order). Although, some parts are ignored, such as DLL redirection, API sets, SxS manifests, loaded module lists, package manifests and the 16 bit folder. This results effectively in the following search order:
- known DLLs
- current path
- system directory
- windows directory
- path variable
- extra paths specified by
-p
Use the -n
option to default search order and onyl hone extra paths.
cmake -B build
cmake --build build
cmake --install build
cmake -B build
cmake --build build
ctest --test-dir build
doxygen
The generated documentation can be found in the doc
subdirectory.
All PE Tools should have a least dependencies as possible so they can be executed on every MS Windows installation without the need of additional DLLs. Therefore they are build
- without use of any C standard library
- without use of any default libraries