Solved

referenced DLLs as seen in Dependency Walker

Posted on 2013-02-03
4
424 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:Mydeen Yussouf
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 44

Expert Comment

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

Accepted Solution

by:
Zoppo earned 125 total points
ID: 38851493
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
ID: 38851506
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 64

Assisted Solution

by:btan
btan earned 125 total points
ID: 38853422
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The canonical version of this article is on my web site here: http://iconoun.com/articles/collisions/ A companion presentation is available here: http://iconoun.com/articles/collisions/Unicode_Presentation.pdf
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
Viewers will learn how to maximize accessibility options in an Excel workbook for users with accessibility issues.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
Suggested Courses

623 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