无法加载DLL找不到指定的模块 [英] Unable to load DLL The specified module could not be found

查看:152
本文介绍了无法加载DLL找不到指定的模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在.NET中使用[DllImport( my.cool.library)]时,会出现类似以下错误:

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

无法加载DLL。 ..找不到指定的模块...

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

...即使所有必需的DLL都已经到位并且可以清楚地访问!?

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

推荐答案

如果在名称中没有句点,则DLLImport仅假​​定扩展名为 .dll。如果使用DLLImport( my.cool.library.dll),它将起作用,否则必须将DLL重命名为 my_cool_library.dll,然后DLLImport( my_cool_library)将起作用。 ;)

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. ;)

这篇关于无法加载DLL找不到指定的模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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