无法加载dll [英] Unable to load dll

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

问题描述


我正在C#中制作dj应用程序,并且现在正在制作播放器部分.但是我有一个问题.我的播放器基于看不见的BASS,我在用户控件中播放器,效果很好.但是当我进入form1时,我在整个Form1屏幕上收到一条警告:无法加载DLL" bass.dll":找不到库.(来自HRESULT的异常:0x8007007E)".我已经将dll放入了bin,obj,properties,recourses和默认文件夹中,但它仍然是这样说的.有人遇到这种问题吗?

Job

Hi
I am making a dj application in C#, and i am making the player section right now. But I have a problem. I have my player based on un4seen BASS I have the player in a user control, works great. but when I go to my form1 the i get a warning over the whole Form1 screen "Unable to load DLL ''bass.dll'': Can''t find the libary. (Exception from HRESULT: 0x8007007E)". I have placed the dll in the bin, obj, properties, recourses and the default folder but it is still saying that. Does anybody experience with this kind a problem?

Job

推荐答案

如果涉及HRESULT,则可能是COM dll.它是否已注册?
If there''s a HRESULT involved, it''s probably a COM dll. Is it registered ?


为bass.dll构建一个tlb文件,然后将tlb文件包含在您的项目中. [
Build a tlb file for bass.dll and then include the tlb file in your project. [^]

Hope this helps.


好吧,可能有几个原因导致此错误,但为此是如何解决的:

在我的项目中,引擎部分是一个dll,用C ++编写,可以将其称为NINJA dll.以及由C#编写的GUI.一切工作正常,直到我在将C ++进行了大量更改(转换为在简单GUI中测试的dll)之前,仍然一切正常.但是当我将NINJA添加到我以前的GUI中时,出现了此错误.
我首先通过将所有dll添加到debug文件夹并通过引用将其添加到生成忍者的C ++项目中来解决了这个问题.并且我还将所有这些dll调试到GUI文件夹,再通过引用将其添加到GUI项目.问题解决了


DLL列表:

dwmapi.dll
phymem.sys
pmdll.dll
RCX4f.tmp
wdapi811.dll
windrvr6.inf
windrvr6.sys
winIO.dll//如果从内部异常中得到错误文件不存在",请添加此内容
winIO.vxd
xpdemok.sys//U总是需要这个,我猜


希望对您有帮助....
Well there may be several reasons causing this error but for this how it was solved:

in my project the engine part was a dll, written in c++ lets call it the NINJA dll. and the GUI written by C#. everything used to work fine until I made a lot of change in C++ converted to dll tested in a simple GUI, and still every thing is fine. but as I add the NINJA to my previous GUI i got this error.
I fixed problem firstly by adding all the dlls to debug folder and adding them by refrence to the C++ project where ninja is built. and I also all these dlls to debug folder of GUI plus adding them by refrence to the GUI project. problem solved


DLLs list:

dwmapi.dll
phymem.sys
pmdll.dll
RCX4f.tmp
wdapi811.dll
windrvr6.inf
windrvr6.sys
winIO.dll//add this if you get error "file does not exist" from inner exception
winIO.vxd
xpdemok.sys//U always need this one I guess


hope this helps....


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

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