1

How do I determine which version of comctl32.dll is being used by a C# .NET application? The answers I've seen to this question usually involve getting version info from the physical file in Windows\System, but that isn't necessarily the version that's actually in use due to side-by-side considerations.

chrisd
  • 245
  • 4
  • 12
  • 1
    can you reword the question to indicate why you'd like this information? What are you trying to do? Perhaps there is a solution which achieves what you want through another mechanism? – Steve Cooper Sep 15 '08 at 20:03

1 Answers1

2

System.Diagnostics.Process.GetCurrentProcess.Modules gives you all the modules loaded in the current process. This also includes the unmanaged win32 dlls. You can search through the collection and check the FileVersionInfo property for the loaded version.

ColdFire
  • 6,764
  • 6
  • 35
  • 51
Lars Truijens
  • 42,837
  • 6
  • 126
  • 143