Keeping Track of Your DLLs

Dynamically linked libraries are an important part of Windows, as well as most other operating systems. By allowing programs to share common code, DLLs help developers to create smaller programs that are easier to maintain and update. DLLs are also essential when creating APIs since they will let you call code written by other developers even if there is no source code. (Try creating a Windows program that doesn't call any DLLs.) Since external functions can be called directly, DLLs are also far more efficient than most message-oriented methods when you create interfaces. Despite all the advantages of DLLs, they do have one big disadvantage, though. Your programs won't run without them! This may not sound like a serious problem. You simply include the appropriate DLLs when distributing your program, right?

Finding Out Which DLLs Are Used by a Specific Process
If you have ever developed complicated software which in turn depends on complicated libraries and code written by someone else, you probably know that including the appropriate DLLs in your distribution is not a simple matter. First, you have to find out which DLLs are actually used by your application. If you are really unfortunate, some library you are using could even decide to load a DLL five minutes after starting the application. (They’re called Dynamic Link Libraries for a reason.) For example, if you are using some libraries to decode video streams, there might be one DLL for each codec supported by the library. If your application starts playing back an MPEG movie after running for five minutes, it will probably load the MPEG codec DLL after five minutes as well, making it even harder to find out which DLLs are needed. Or you might be writing a Windows hook DLL, which is supposed to get loaded by all running processes. How do you debug this? The answer is actually quite simple. You need a process-monitoring utility that lists DLLs per process. This screenshot from WinTasks 5 Professional shows all DLLs currently loaded by the Outlook application.

The above screenshot from WinTasks 5 Professional shows all dlls currently loaded by the Outlook application.

Monitoring Processes and Modules with WinTasks 5 Professional
WinTasks 5 Professional lets you monitor which DLLs are used by a process. This program list all modules, or DLLs, used by a specific process. You can also search for a specific DLL to find out exactly which processes are currently using it. For example, you can use this feature to debug a Windows hook DLL and it will save you many hours and reboots by allowing you to terminate all processes that don't unload the DLL. WinTasks also includes some logging features that make it possible to log DLL usage over longer time periods. This will definitely simplify the process of creating minimal distributions that work on any system. Using a tool like WinTasks can also help you solve those terrible compatibility problems that may otherwise take hours.

File Extension Details