C#在运行时自动引入正确的Dlls
2021-01-25 18:14
标签:imp ext director get entry private environ return csharp 1.导入Native函数 2.在引入包装类中设置相应的Dlls的搜索路径 C#在运行时自动引入正确的Dlls 标签:imp ext director get entry private environ return csharp 原文地址:https://www.cnblogs.com/linxmouse/p/12009946.html设置程序Dlls的搜索路径
///
var path = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
path = Path.Combine(path, Environment.Is64BitProcess ? "x64" : "x86");
SetDllDirectory(path);