Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Best Way to Get Installed DLL Version

Best Way to Get Installed DLL Version

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestionannouncement
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    John Clump
    wrote on last edited by
    #1

    Hi everyone. In a program I am writing, I need to check which version of some system dlls are installed, for example. mfc42.dll, comctrl.dll, and a few others. I know there is a few ways of doing this, but what would be the "best" way to do this so that it will be compatible with future versions of Windows, and requires the least amount of overhead? Thanks in advance for any help!

    A 1 Reply Last reply
    0
    • J John Clump

      Hi everyone. In a program I am writing, I need to check which version of some system dlls are installed, for example. mfc42.dll, comctrl.dll, and a few others. I know there is a few ways of doing this, but what would be the "best" way to do this so that it will be compatible with future versions of Windows, and requires the least amount of overhead? Thanks in advance for any help!

      A Offline
      A Offline
      Alex Cramer
      wrote on last edited by
      #2

      See April 98 C++ Q&A in MSDN Q How can I tell which version of a particular module (DLL) is installed on my system? I am trying to figure out which version of comctl32.dll is installed. I have seen code that calls GetProcAddress to try getting various functions like InitCommonControlsEx to determine the version based on which functions are present. This seems kludgy to me. What is the right way to get the version? A Well, there are two ways: the easy way and the hard way. The easy way is to call a special new entry DllGetVersion. The only problem is, while comctl32.dll supports this function, not all DLLs have it. If there's no DllGetVersion, you have to use the hard way—namely, the FileVersion API, which is perhaps one of the most confusing APIs you will ever come across.............. (see MSDN)

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups