哪里的DllImport寻找非托管的DLL? [英] Where does DLLImport look for unmanaged DLLs?

查看:140
本文介绍了哪里的DllImport寻找非托管的DLL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个快速的问题:当在.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.

也许<一href="http://stackoverflow.com/questions/154281/windows-path-searching-in-loadlibrary-with-manifest">Windows路径搜索中调用LoadLibrary与清单将是有益的。

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

这篇关于哪里的DllImport寻找非托管的DLL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆