06-22-2010 10:15 AM
The link that Anna posted above explains how LabVIEW looks for dlls. Here's a little more explanation.
The first place is the Global Assembly Cache (GAC). This is located on your computer at C:\Windows\assembly. You can only put an assembly in the GAC if it is strongly signed. So you can try dragging the CyUSB.dll to that folder and if it is strongly signed it will install it into the GAC and then LabVIEW should be able to find it. If it is not strongly signed you will have to use one of the other two methods.
The original poster of this forum solved their problem with method two. They created a project in LabVIEW that contains the VI that is calling CyUSB.dll. Then put CyUSB.dll in the same directory as your project or as a subdirectory of your project.
Did you write CyUSB.dll or did you get it from someone else.
It is also possible that CyUSB.dll has other dependencies that are not able to be found. So make sure other assemblies that are required by CyUSB.dll are also in the GAC or in a subfolder of your project.
Here is more information from Microsoft about how the .NET Runtime probes to find dependent assemblies: http://msdn.microsoft.com/en-us/library/15hyw9x3.aspx
06-22-2010 07:48 PM
06-22-2010 08:02 PM
05-03-2011 04:52 AM
Hi Eudaemonic,I'm also trying to use CyUSB.dll in labview.I copied the dll into the same directory with the labview project and i also copied into the GAC.However,in the constructor node,i still get the "this class has no public constructors" message in some objects,some other objects are ok.How can i have access to the endpoint buffers and the vendor requests?I understand that you have implemented something similar,so i would really appreciate it if you could help me.
05-04-2011 02:15 PM
Hi cocopa,
Are the objects in which you are getting this error included in the CyUSB.dll? They may be in another dll that should be moved to the GAC or project directory. What version of LabVIEW are you working with? What are you referring to when you say the endpoint buffers and vendor requests? I look forward to your response.
Regards,
Jackie
05-05-2011 02:09 AM
Hi Jackie!
Thank you for your reply,I found what I had to do in the programmer's reference of the CyUSB.There wasn't anything wrong with the dll or labview,it was just something i had to do to "generate" these objects.Thanks again anyway!
05-05-2011 04:20 PM
Great, glad you got it working again!
Regards,
Jackie
06-06-2012 03:21 PM
Hi cocopa
i am in the same sitation of you but a cant see in the programer reference of cyusbwhat i need to do , so if you can easy explain what we need to do, thanks.
06-06-2012 04:16 PM
taken from de cyusb programmers reference pag 139,:
The USBDeviceList class is at the heart of the CyUSB class library. In order to successfully utilize
the library, a good working knowledge of the USBDeviceList class is essential.
USBDeviceList represents a dynamic list of USB devices that are accessible via the class library.
When an instance of USBDeviceList is created, it populates itself with USBDevice objects
representing all the USB devices served by the indicated device selector mask. These USBDevice
objects have all been properly initialized and are ready for use.
Once an instance of the USBDeviceList class has been constructed, the USBDeviceList index
operators make it easy to locate a particular device and begin using it.
Because USBDeviceList implements the IDisposable interface, you should call its Dispose method
when you finish using a USBDeviceList object.
i cant understand what i need to do in labview to use de objects in cyusb.dll i am confused.
thanks.
06-08-2012 11:22 PM
hi, cocopa,
I am trying to use CyUSB.dll in LabVIEW too, but failed.
My code as follow, it is good running before method "get_Item", and the count of USBDeviceList is 1 or 0 depends on CY7C68013A is attached or not. When it runs after method "get_Item", LabVIEW will be crashed....
It's very kind of you if you give me some advice or an example.