且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

C#获取非托管的DLL版本

更新时间:2023-02-12 16:38:18

作为感谢通过logicnp陈述;的的Assembly.Load仅用于管理组件。要确定您可以使用System.Diagnostics.FileVersionInfo.GetVersionInfo(文件名)和加载并调用DLL中您可以参考这些文章非托管程序任何版本-ED文件的版本:

As stated by logicnp; the Assembly.Load is for managed assemblies only. To determine the version of any version-ed file you can use System.Diagnostics.FileVersionInfo.GetVersionInfo(filename) and to load and call unmanaged procedures in DLLs you can refer to these articles:

http://blogs.msdn.com/jonathanswift/archive/2006/ 10月2日/ 780637.aspx
http://blogs.msdn.com/jonathanswift/archive/2006/10/03/Dynamically-calling-an-unmanaged-dll-from-.NET- _2800_C_23002900_.aspx

http://blogs.msdn.com/jonathanswift/archive/2006/10/02/780637.aspx http://blogs.msdn.com/jonathanswift/archive/2006/10/03/Dynamically-calling-an-unmanaged-dll-from-.NET-_2800_C_23002900_.aspx

好运...