Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何确定 C# .NET 应用程序正在使用哪个版本的 comctl32.dll?我看到的这个问题的答案通常涉及从 Windows\System 中的物理文件获取版本信息,但由于并行考虑,这不一定是实际使用的版本。
System.Diagnostics.Process.GetCurrentProcess.Modules为您提供当前进程中加载的所有模块。这也包括非托管的 win32 dll。您可以搜索集合并检查FileVersionInfo加载版本的属性。
System.Diagnostics.Process.GetCurrentProcess.Modules
FileVersionInfo