Unable to load DLL The specified module could not be found

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 02:57:59

问题


When using [DllImport("my.cool.library")] with .NET you get an error similar to the following:

"Unable to load DLL... The specified module could not be found..."

...even though all the required DLLs are in place and clearly accessible!?


回答1:


Turns out DLLImport only assumes the ".dll" extension if you do not have periods in the name. If DLLImport("my.cool.library.dll") was used, it would work, otherwise the DLL will have to be renamed to "my_cool_library.dll", and then DLLImport("my_cool_library") will work. ;)



来源:https://stackoverflow.com/questions/16479139/unable-to-load-dll-the-specified-module-could-not-be-found

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!