Previous section   Next section

VIEWING APPLICATION DEPENDENCIES

Anytime an application fails to execute properly or fails to load, a support tool in the Windows Server 2003 Resource Kit, called the Dependency Walker, can be an excellent analytical utility. It shows the minimum set of files required to run an application or load a DLL, and it shows which functions are exposed by a particular module and which ones are called by other modules. Moreover, it illustrates the full path of all modules being loaded by an application, plus their base addresses. When an application fails, the Dependency Walker provides an error message about the problematic components.

The Dependency Walker operates by recursively scanning all dependent modules required by an application. Missing files are detected first; then corrected or invalid files are identified. For example, a 16-bit version of a DLL might be present when a 32-bit version is required. Circular redundancy problems and CPU mismatches are also detected during the recursive scans.

The Dependency Walker (Figure 2.24) identifies different types of dependencies between modules, which are briefly described in Table 2.4.

Figure 2.24. The Windows Server 2003 Resource Kit's Dependency Walker

graphics/02fig24.jpg

To review an application's dependencies, load the Dependency Walker from the Start menu choose Programs Windows Server 2003 Support Services Tools. From the Files menu select Open and browse to the desired application or DLL.

The Dependency Walker can also be used for application profiling. This technique permits it to detect dynamically loaded modules in a running application that may not be reported in the static import tables. The profiler is also used to detect that a module has failed to initialize. This activity is initiated once an application is loaded into the Dependency Walker. From the Profile menu, select Start Profiling. You will then need to select the options from the Profile Module dialog box. Continue the process until the desired information is obtained. To terminate the analysis, select the Profile menu Stop Profiling.

NOTE

The Windows Server 2003 Resource Kit also supplies a command-line method of launching the Dependency Walker through the depend.exe command-line utility.


Figure 2.25 displays the dialog box that permits the selection of the stable operation system for a given application.

Figure 2.25. The Windows Server 2003 Resource Kit's Application Compatibility Tool

graphics/02fig25.gif

Table 2.4. Types of Dependency between Modules

Type

Description

Implicit

A load-time dependency in which one module calls functions in another module. Even if no direct calls are made to the second module, that module is still loaded into memory.

Delay-Load

A dynamic dependency in which a module is loaded only when a specific call is made to it by the application.

Forward

A dependency in which an application calls a function in a dependent module that is actually available from another module. The call is forwarded from the second module to the third module.

Explicit

A run-time dependency, that is, a dynamic load of library functions common to OCXs, COM objects, and Visual Basic applications.

System Hook

A dependency that occurs when a specific application action is undertaken; for example, the use of a mouse will result in a new process.


  Previous section   Next section
Top