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?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
I think it is working like LoadLibrary.
Maybe Windows path searching in LoadLibrary with manifest will be helpfull.
Edit Dynamic-Link Library Search Order is probably what you want.
回答2:
Generally, you'd expect it to look at whatever's defined in the user's Path.
To find out what this contains, from a command prompt, type echo %PATH%
[Enter]