开发者

How to add avicap32.dll into VS2010

开发者 https://www.devze.com 2023-03-06 23:40 出处:网络
I\'m writing a small code in C# using visual studio 2010 express. I\'m trying to add avicap32.dll from C:\\WINDOWS\\system32 to the \"References\" but getting an error saying that \"A reference to \'C

I'm writing a small code in C# using visual studio 2010 express. I'm trying to add avicap32.dll from C:\WINDOWS\system32 to the "References" but getting an error saying that "A reference to 'C:\WINDOWS\system32\avicap32.dll' could not be added. Please make sure that the file is accessible, and that is a valid assembly or COM component". How to 开发者_如何学Cget rid of this?

thanks in advance,

Sri


I am not familiar with this library itself, but I've seen this error many times before when trying to work with 3rd party libraries. Assuming you've done the diligence in making sure that things are, in fact, accessible and this is not a permissions problem (double check!), this happens when the referenced dll doesn't the .net metadata in it. Sometimes VS can 'figure it out' even if the metadata isn't explicitly present, but oftentimes it can't. This could be for a number of reasons, but most commonly it's because the dll was written in unmanaged code, like C++.

The solutions to this problem are always in a little bit of flux depending on the specifics of the DLL you're trying to use, and I don't really have too many details on this library you're trying to add. I picked up a few forum posts that will hopefully set you on the right track, but if not please comment with some extra details so we've got more information to help out. (Pages: 1 2 3)


pInvoke lists many declarations for most of the system dll functions you can try and import. Click on advapi32 in the left menu and you'll get a list of things they have a declaration for.

0

精彩评论

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

关注公众号