Hello, I have got project in C# and I am using V120:Trio camera. When in connect the camera to usb it connects successfully, but if I start my project it shows this error:
http://i.imgur.com/Ddh48B2.png
http://i.imgur.com/XeBwYjk.png
I am using DllImport with NPTrackingTools.dll, which is copied into each folder of project. Dll import looks like this:
[DllImport("NPTrackingTools.dll", EntryPoint = "TT_Initialize", CallingConvention = CallingConvention.Cdecl)] public static extern void TT_Initialize();
Where is my problem? When I am using Tracking tools everything goes properly but if I try to connect it with my program it goes wrong.
System is Windows 7.
Unable to load dll problem
Re: Unable to load dll problem
We recommend using C++/CLI to create .NET wrappers for the Tracking Tools API. It provides better control over how functions and their arguments get mapped into .NET and provides a nicer syntax for you to work with.
Your call to DllImport looks fine, although you might try just removing the EntryPoint and CallingConvention options for starters as they should not be required. I also noticed that the call stack looked like it was erroring at TT_Shutdown. Have you also mapped that function?
It would be helpful if you could paste the text of what follows "Unable to load DLL TrackingTools.dll", either translated to English, or as native text so that we can translate it to English. It may provide more insight on what is happening.
Your call to DllImport looks fine, although you might try just removing the EntryPoint and CallingConvention options for starters as they should not be required. I also noticed that the call stack looked like it was erroring at TT_Shutdown. Have you also mapped that function?
It would be helpful if you could paste the text of what follows "Unable to load DLL TrackingTools.dll", either translated to English, or as native text so that we can translate it to English. It may provide more insight on what is happening.