Solved

referenced DLLs as seen in Dependency Walker

Posted on 2013-02-03
4
409 Views
Last Modified: 2013-03-25
Hi, I have a bunch of DLLs referenced in my application, but when I view the application in Dependency Walker I do not see those DLLs, I only see the system DLLs, How does this work, thanks!
0
Comment
Question by:olmuser
4 Comments
 
LVL 44

Expert Comment

by:AndyAinscow
Comment Utility
Does your app actually call any functions in those dll's ?  (Does it compile and run if you remove the dependancy?)
0
 
LVL 30

Accepted Solution

by:
Zoppo earned 125 total points
Comment Utility
Hi olmuser,

there are two ways to use a DLL:

1. DLL is implicitely linked to the EXE: when the executable is created the linker adds functionality which loads a needed DLL if it's not yet loaded and replaces some kind of dummy functions with the functions loaded from the DLL. In this case the list of needed DLLs is stored in the binary. These can be shown by DependencyWalker.

2. Explicit use: the executable loads DLLs at runtime using LoadLibrary and accesses function with GetProcAddress. In this case there's usually no info available in the binary which DependencyWalker can use to determine the dependencies. (I say usually because it might be possible for DependencyWalker to find places like i.e. LoadLibrary( "user32.dll" ), but at least when i.e. all DLLs within a given directory are loaded iterating through the files per code this won't be possible).

Hope that helps,

ZOPPO
0
 
LVL 86

Expert Comment

by:jkr
Comment Utility
I'm with Zoppo here. You can find out about that easily if you choose 'Profile...' from the Dependency Walker's main menu, it will show all DLL load events. Oh, and one thing to add to what Zoppo wrote: There's also a '3.' which applies to COM DLLs - these are also loaded via 'LoadLibrary()' after the sever DLL is found via a registry lookup.
0
 
LVL 61

Assisted Solution

by:btan
btan earned 125 total points
Comment Utility
Below can be helpful for understanding especially for dynamic loading and system hooks, it needs runtime profiling. So you can try using Application Profiling to Detect Dynamic Dependencies

http://www.dependencywalker.com/help/html/application_profiling.htm

When a module is first opened by Dependency Walker, it is immediately scanned for all implicit, delay-load, and forwarded dependencies. Once all the modules have been scanned, the results are displayed. In addition to these known dependencies, modules are free to load other modules at run-time without any prior warning to the operating system. These types of dependencies are known as dynamic or explicit dependencies. There is really no way to detect dynamic dependencies without actually running the application and watching it to see what modules it loads at run-time. This is exactly what Dependency Walker's application profiling.

It is the job of the user to "exercise" the application to ensure that all dynamic dependencies are found. Usually dynamic dependencies are only loaded when needed.needed. For example, modules related to printing might only be loaded if the application actually prints. In a case like this, if the application does not perform a print while being profiled, then Dependency Walker will not detect those modules related to printing. Other modules might only get loaded if an error occurs in the application. Scenarios like these might be hard to produce. Because of this, It is impossible to guarantee that all dynamic dependencies are found, but the more an application is exercised, the better the odds are of finding them.

The faq is useful reference
http://www.dependencywalker.com/faq.html

You may be interested to look at Process Explorer
http://www.symantec.com/connect/blogs/using-process-explorer-who-loaded-dll
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

The password reset disk is often mentioned as the best solution to deal with the lost Windows password problem. In Windows 2008, 7, Vista and XP, a password reset disk can be easily created. But besides Windows 7/Vista/XP, Windows Server 2008 and ot…
Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now