哪里的DllImport寻找非托管的DLL?DllImport、DLL

2023-09-03 07:22:07 作者:糙汉子

有一个快速的问题:当在.net声明DllImport属性,哪里运行时的样子,以解决该DLL的依赖?我本来转储DLL和所有的及其的bin文件夹的依赖?

A quick question: When declaring the DLLImport Attribute in .Net, where does the runtime look to resolve that DLL dependency? Would I have to dump the DLL and all of its dependencies in the bin folder?

推荐答案

我觉得它正在像调用LoadLibrary。

I think it is working like LoadLibrary.

也许Windows路径搜索中调用LoadLibrary与清单将是有益的。

修改 动态链接库搜索顺序可能是你想要的。