Track Function Calls Between DLL and Executables

Updated Nov 20, 2019

Reported In

Software

  • LabWindows/CVI
  • LabVIEW

Operating System

  • Windows

Issue Details

  • I have an executable that makes function calls to one or more dynamic link libraries (DLLs). Is there a way to determine what calls are made by my executable?
  • I have a primary DLL that makes calls to a secondary DLL. Is there a way to track the calls the primary DLL makes to the secondary DLL?

Solution

There is a utility called Dependency Walker that provides a solution to the above two cases. It scans any Windows module (.exe, .dll, .ocx, .sys, etc.) and builds a tree diagram of all dependent modules, along with a list of functions called in each module. It catches all dependency types, including dynamic ones, that are loaded at run-time. 

The latest version of Dependency Walker is version 2.2 and it can be downloaded from dependencywalker.com. This version is compatible with Windows versions XP and 7.

For Windows 10, you can find a rebuilt version of the tool called Dependencies in the next link: [External]: Dependencies

As of LabWindows/CVI 6.0, the Source Code Browser utility was added. It enables you to cross-reference each function and variable across your project.