Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Profiling x86 executable with Dependency Walker hangs on Windows 7 x64

Tags:

Under Windows 7 x64, when I try to profile an x86 executable with the latest version of Dependency Walker (2.2.6000) the profiling process always hangs at a certain point. Most of the time the last DLL that is loaded is c:\windows\syswow64\URLMON.DLL, so it seems that something inside that DLL is causing a problem. Profiling the same executable on Windows 7 x86 works flawlessly.

I have googled quite extensively, but couldn't come up with a solution to the problem. One suggestion that I found was to uninstall IE 8 or IE 9 and replace it with IE 7, but this doesn't really help. The only effect that I can observe is that with IE 7 the profiling process hangs at a different DLL (iertutil.dll, if I remember correctly, also from the system's syswow64 folder).

So my question is: How can I get Dependency Walker to profile x86 applications on x64 Windows 7? Of course, it would also be nice to know why the problem exists in the first place :-)

Some final notes:

  • I am using the x86 version of Dependency Walker because I want to profile an x86 executable
  • Running Dependency Walker as administrator does not help
  • All profiling options marked as "may fail on WOW64" are disabled
  • The executable I am currently using as a test case to reproduce the problem is the Sumatra PDF viewer (download link) because it is a simple .exe that does not need installation
like image 237
herzbube Avatar asked Jan 12 '12 09:01

herzbube


People also ask

Does Dependency Walker work on Windows 10?

Dependency Walker (Depends), which can be launched via Process Explorer, no longer works well in Windows 10 as of at least build 10.0. 19043 (21H1 May 2021 update). The UI can hang for several minutes while (e.g.) enumerating Notepad's dependencies. It may be time to have Process Explorer link to an alternative.


1 Answers

Updated instruction based on @Stone Free's comments

The download link you need has changed to:

https://www.microsoft.com/en-us/download/details.aspx?id=42273

Go down to the 2. Install WDK 10 section and select the download:

Locate and run the Wdk setup (wdksetup.exe) from stage 2, then choose the download option rather than install.

Once completed locate and run DownloadLocation\Windows Kits\10\WDK\Installers>"Windows Driver Kit-x86_en-us.msi"

Then you will find Dependency Walker at:

  • C:\Program Files (x86)\Windows Kits\10\Tools\x64\depends.exe for the 64 bit version
  • C:\Program Files (x86)\Windows Kits\10\Tools\x86\depends.exe for the 32 bit version

Which is Dependency Walker version 2.2.10011 built 2015-10-29 x86 version

A handy tool is to use https://github.com/juntalis/depends-launcher which is a simple launcher for Dependency Walker that determines the platform (x86|x64|ia64) of an windows image (dll, exe, etc) and launches the appropriate version of depends.exe to view its dependencies. It's main purpose is for use in a context menu entry to easily view an image's dependencies.

like image 72
Sam Avatar answered Sep 19 '22 06:09

Sam