הערה
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות להיכנס או לשנות מדריכי כתובות.
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות לשנות מדריכי כתובות.
Question
Wednesday, January 26, 2011 4:54 PM
I'm attempting to write a small program to record video from a uEye camera. Provided with said camera was a SDK and associated materials. Most of the .dlls are referenced with no issues, excluding "uEye_tools.dll", which happens to be the one in charge of AVI recording. I've attempted reinstallations, redownloads, and re-referencing. Every time I get the error of "please make sure that the file is accessible and that it is a valid assembly or com component". I've also attempted to regsvr32 it, only to get the same error.
I'm running Windows 7 32 bit, with Visual Studio 2010, working in VB.net. Any help or leads would be greatly, greatly appreciated. Thank you!
All replies (1)
Friday, January 28, 2011 7:14 AM ✅Answered
Hi CWilliams,
Normally, if it is a .NET dll, we can use Add reference to import it to the project. But if not, we have 2 approaches to do that, one is by add reference which will generate an interop dll to convert COM component to .Net component, and the other is by PInvoke to call the methods inside that dll. For uEye_tools.dll, I think you could try to use P/Invoke first, if you still could not work it out after trying, then I would recommend you to contact the third party side for more efficient responses. In addition, you are not able to use regsvr32 to register that dll since it is only adapted for COM components.
For more information about P/Invoke, please kindly refer to these links.
What is Platform Invoke Service
http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/ea96d60f-c468-493c-b145-39af98aa6ddc
Using P/Invoke to Call Unmanaged APIs from Your Managed Classes
http://www.microsoft.com/indonesia/msdn/pinvoke.aspx
Calling Win32 DLLs in c# with P/Invoke
http://msdn.microsoft.com/en-us/magazine/cc164123.aspx
Best Regards,
Kee Poppy [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.