Module Search Order Dialog
This resizable dialog is used to configure how Dependency Walker locates dependent modules. When you first open a module in Dependency Walker, it is scanned for all modules it is dependent on. Then, all those dependent modules are scanned for their dependent modules. This recursion is repeated until all modules have been scanned. Inside each module are various tables that provide this information. However, only the file names of the dependent files are specified and not complete file paths. For this reason, it is the job of Dependency Walker to search your system for each file to establish a full path to the files. This is where the Module Search Order Dialog comes into play.
The Module Search Order Dialog allows you to specify where Dependency Walker should look for dependent modules. By default, Dependency Walker is set up to simulate the search algorithm that the operating system uses to locate modules. You can override this default behavior and set up your own custom search criteria. This can be helpful for various reasons. For example, maybe you want to check the dependencies of a group of MIPS Windows CE files on your x86 Windows computer. Since you really don't want Dependency Walker to accidentally pick up x86 Windows modules as dependencies, you can remove all the default search criteria from the search order and just add directories that contain MIPS Windows CE modules.
If the active Module Session is actually a loaded Dependency Walker Image (DWI) file, then the dialog will show the search order that was in use on the computer that created the DWI file. Also, the caption of the dialog will contain the name of the DWI file, and many of the controls listed below will not be accessible since the search order cannot be modified when viewing the results from a DWI file. If the current Module Session is not a DWI file, then the dialog's caption will contain the text "(Local)" in it.
The Module Search Order Dialog has seven predefined locations it searches for files. In addition to these seven locations, you can add search directories of your own. The seven predefined locations include the following:
Side-by-Side components (Windows 2000/XP/2003/Vista/7/8/+)
Starting with Windows 2000, applications can create an empty
"app.exe.local" file in the same directory as the main EXE to instruct
Windows to search the local directory for dependent modules before the
rest of the search path. Starting in Windows XP, "app.exe.local" may be
a file or a directory. If a directory is used, the loader will search
the "app.exe.local" directory for dependent modules as well as
the application directory before the rest of
the search path. Also starting in Windows XP, applications can override the operating system's default search order by providing
more detail instructions about the versions and/or locations of modules it requires. These instructions
consist of an XML manifest that can be stored in a special "app.exe.manifest" file or as an RT_MANIFEST resource in
any module. In most cases, an XML manifest will override any
The system's known DLLs list.
These are known modules like KERNEL32.DLL. When the operating system encounters a known DLL, it skips all rules and loads it from a known place.
The application directory.
This is the directory that the main module of your application lives in.
The 32-bit system directory.
This is your 32-bit system directory. On Windows NT/2000, it is usually something like C:\WinNT\System32\. On Windows XP/2003/Vista/7/8, it is usually something like C:\Windows\System32\. On Windows 95/98/Me, it is usually something like C:\Windows\System\.
The 16-bit system directory (Windows NT/2000/XP/2003/Vista/7/8/+).
This is your 16-bit Windows directory and only exists on Windows NT/2000/XP/2003/Vista/7/8/+. On Windows NT/2000, it is usually something like C:\WinNT\System\. On Windows XP/2003/Vista/7/8, it is usually something like C:\Windows\System\.
The system's root OS directory.
This is the directory that your operating system is installed to. It is usually something like C:\WinNT\ on Windows NT/2000 and C:\Windows\ on Windows 95/98/Me/XP/2003/Vista/7/8.
The application's registered "App Paths" directories.
This is a set of directories that an application can register for itself in the "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\" section of the registry. If an application has registered one or more directories, then those directories will be searched for dependent files. This feature is actually provided by the Shell and not by the core operating system. When an application is started by calling a Shell function (like ShellExecute or ShellExecuteEx), the Shell checks the registry to see if the application has registered a path in the "App Paths" section. If so, that path is inserted into the head of the PATH variable for the application about to be started. Most newer applications use the Shell functions to start other applications, but for applications that call CreateProcess, the applications started will not receive their "App Paths" path as part of their search order.
The system's "PATH" environment variable directories.
The last item in a module's search order is usually the PATH variable. This is a user-definable system variable that is seen by all applications running on a given computer. It usually contains one or more directories where common modules can be found.
The Module Search Order Dialog has the following controls:
Available Search Groups
If you remove one or more of the predefined search locations from the
Current Search Order list, they will be added to this list so that you can access them if you wish to add them back to the
Current Search Order. The locations in this list will not be part of the search order.
Current Search Order
This list displays the current search order. It can contain any number of the predefined search locations as well as any number of user-defined directories. When Dependency Walker is searching for a module, it will start at the top of the list and work its way down until the module is found. If the end of the list is reached with no match, then Dependency Walker gives up and marks the module as "Not Found"
This moves the highlighted item in the Available Search Groups list to the bottom of the
Current Search Order list. Once moved, you can move it up the list if necessary using the
Move Up button. If no item is highlighted in the Available Searches list, then this button will be disabled.
This moves the highlighted item in the Current Search Order list to the bottom of the
Available Search Groups list. If no item is highlighted in the
Current Search Order list, then this button will be disabled.
Press this button to show all the files and/or directories that belong to each search group. When this button is not pressed, just the group names are displayed.
This moves the highlighted item in the Current Search Order list up one position. If no item is highlighted, or the first item is highlighted, then this button will be disabled.
This moves the highlighted item in the Current Search Order list down one position. If no item is highlighted, or the last item is highlighted, then this button will be disabled.
Press this button to load a Dependency Walker Path (DWP) file from disk. See the
Dependency Walker Path (DWP) Files section for more information. You may also load DWP files from the
Command Line when first starting Dependency Walker.
This button resets the Current Search Order list to its default configuration. This will cause all user-defined directories to be removed from the list.
This button and text field allow you to add user-defined search directories to the search order. You can type in a directory you wish to add or press the
Browse button to graphically pick a directory. If no text is present in the text field, then the
Add Directory button will be disabled. You can add as many user-defined directories as you wish. Directories are added to the bottom of the
Current Search Order list. To move them up the list, use the Move Up button.
This button allows you to graphically choose a directory to be added to the
Current Search Order list. Once pushed, a browse dialog will appear allowing you to choose a directory. If you choose a directory from the browse dialog, it will show up in the
Add Directory text field. To actually add the directory to the search order, you need to press the
Add Directory button.