CodeGuru
Earthweb Search
Forums Wireless Jars Gamelan Developer.com
CodeGuru Navigation
Member Sign In
User ID:
Password:
Remember Me:
Forgot Password?
Not a member?
Click here for more information and to register.

Become a Marketplace Partner

jobs.internet.com

internet.commerce
Partners & Affiliates
















RSS Feeds

RSSAll

RSSVC++/C++

RSS.NET/C#

RSSVB

See more EarthWeb Network feeds

Home >> Visual C++ / C++ >> Windows Programming >> DLL


Display Loaded Modules
Rating: none

Emmanuel KARTMANN (view profile)
January 3, 2000


(continued)



Sample Image

Environment: VC6 SP3, NT4 SP4, Windows 95/98

Have you ever experienced an error while loading a DLL when you start an application? Invalid DLL version? Entry point @XXXX not found?

If the answer is yes, then this application is for you!

On you LAN, there may be thousands of versions of a DLL! Which version are you using? Which DLL has effectively been loaded by your application? You must check the PATH, the current working directory of your process, etc...

This small application, called "DisplayLoadedModules", connects to a running process, gets the list of DLLs loaded by the process, and display the following information for every DLL:

  • Module File Path (e.g. "C:\WINNT4\System32\WS2_32.dll")
  • Module Description (e.g. "Windows Socket 2.0 32-Bit DLL")
  • Module File Version (e.g. "4.00")
  • Associated Product Name (e.g. "Microsoft(R) Windows NT(TM) Operating System")
  • Associated Product Version (e.g. "4.00")
  • Module File Size (e.g. "59664 bytes")
  • Module Creation Date (e.g. "October 14, 1996 03:38:00")

You can also click on the "Who's Locking?" button to find which process has loaded (and thus locked) a DLL. Usefull when you want to delete/move/upgrade a DLL and you get an access denied error (you find the process which locks the DLL and stop it instead of rebooting your computer).

The application can also save the output to a text file. If your application runs on a machine "A" and not on a machine "B", you can compare (using 'diff' or 'windiff') the output of the program on both machines. If you're experiencing a DLL versioning problem, you'll figure out very easily...

On Windows NT, the executable uses one additional DLL: PSAPI.DLL For more on these APIs, please refer to MSDN Platform SDK:

On Windows 98, the executable uses the ToolHelp32 library. For more on this APIs, please refer to MSDN Platform SDK:

What's new in version 1.10

Regarding to previous version posted in Codeguru (v1.4), this new release provides the following new features:

  • Who's Locking Button: find which process is locking a DLL.
  • Resizable window
  • Runs on Windows NT, Windows 98 and Windows 95 with one executable
  • Cleaner Source Code: one reusable C++ class to browse through running processes/modules.
  • Three kits: Source Code only, small kit (executable plus documentation only), full kit (with MFC 42 version 6.0 DLL, for plain systems without VC++ 6.0 installed).

Acknowledgement

The version info is fetched via the CFileVersion class by Manuel Laflamme (posted in www.codeguru.com).

Web Site

This tool is also available on my web site:

http://www.kartmann.claranet.fr/tools.htm
http://www.kartmann.claranet.fr/tools/DisplayLoadedModules/Readme.htm

Downloads

Download runtime - 112 Kb
Download source - 91 Kb

Tools:
Add www.codeguru.com to your favorites
Add www.codeguru.com to your browser search box
IE 7 | Firefox 2.0 | Firefox 1.5.x
Receive news via our XML/RSS feed







RATE THIS ARTICLE:   Excellent  Very Good  Average  Below Average  Poor  

(You must be signed in to rank an article. Not a member? Click here to register)

Latest Comments:
Saved my hair! - Legacy CodeGuru (09/26/2003)
Exelent tool - Legacy CodeGuru (11/27/2002)
DLL - Legacy CodeGuru (04/29/2002)
error on loading Visual studio - Legacy CodeGuru (02/20/2001)
Nice job. Suggestion - sortable columns. - Legacy CodeGuru (04/27/2000)

View All Comments
Add a Comment:
Title:
Comment:
Pre-Formatted: Check this if you want the text to display with the formatting as typed (good for source code)



(You must be signed in to comment on an article. Not a member? Click here to register)


JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
Intel PDF: Virtualization Delivers Data Center Efficiency
Intel eBook: Managing the Evolving Data Center
Microsoft Article: BitLocker Brings Encryption to Windows Server 2008
Symantec eBook: The Guide to E-Mail Archiving and Management
Microsoft Article: RODCs Transform Branch Office Security
Go Parallel Article: James Reinders on the Intel Parallel Studio Beta Program
Avaya Article: Advancing the State of the Art in Customer Service
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
Avaya Article: Avaya AE Services Provide Rapid Telephony Integration with Facebook
Go Parallel Article: Getting Started with TBB on Windows
HP eBook: Storage Networking , Part 1
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Intel Seminar: Efficiencies in Hardware/Software Virtualization
HP Webcast: Disaster Recovery Planning
Go Parallel Video: Performance and Threading Tools for Game Developers
HP Video: StorageWorks EVA4400 and Oracle
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
IBM TCO eKIT: Your IT Budget is Under Attack, Get in Control
IBM Energy Efficiency eKIT: Learn How to Reduce Costs
30-Day Trial: SPAMfighter Exchange Module
Red Gate Download: SQL Toolbelt and free High-Performance SQL Code eBook
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
Microsoft Article: Silverlight Streaming--Free Video Hosting for All
Featured Algorithm: Intel Threading Building Blocks - parallel_reduce
HP Demo: StorageWorks EVA4400
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES