开发者

c# dll not found

开发者 https://www.devze.com 2022-12-18 17:38 出处:网络
I am writing a small AOL IM application in C#. I have all the dlls that I need and I have been able to compile and run my app. However, when it runs I get an error that says

I am writing a small AOL IM application in C#. I have all the dlls that I need and I have been able to compile and run my app. However, when it runs I get an error that says

"Unable to load DLL 'acccore.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"

I understand that this means the acccore.dll file couldn't be fo开发者_StackOverflow中文版und but I don't know why. I tried putting it in C:\Windows\System32 and it is also in the debug directory that is created when the project is build in Visual Studio. Can anyone tell me how to make my application know where this dll is located?

Thanks!


I did some research and it looks like acccore.dll is a COM DLL file. That means you need to run:

regsvr32.exe C:\Windows\System32\acccore.dll

This will register the COM DLL into the registry, you can then use that DLL in your .NET code. Check out the link:

http://64.12.130.129/forum?c=showthread&ThreadID=1173

So you will need to use P/Invoke to use the DLL (I guess the AOL SDK has some example code you can use).


is this dll an assembly?

If so then fuslogvw will show you where the CLR is looking for assemblies. Put it where .net is looking


.NET assemblies need to be in the directory of the application (or one of its subdirectories, especially if they represent a localized version of a different assembly), or in the GAC (global assembly cache.) If the DLL isn't in the same directory as the .EXE, then that's your problem. If it is and it still doesn't work, it means that the assembly doesn't match for some reason.


I used dependancywalker to find the dll I was missing that caused it to error. This was suggested by Taylor Leese in a comment.

0

精彩评论

暂无评论...
验证码 换一张
取 消