LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"This class contains no public constructors" message

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

Kristen
National Instruments
0 Kudos
Message 11 of 43
(3,492 Views)
I take it for your advice, but is still no. I hope you can see it,can you give me your email. This forum cannot be uploaded.
0 Kudos
Message 12 of 43
(3,483 Views)
this dll is cypress company. http://www.cypress.com/?rID=34870
0 Kudos
Message 13 of 43
(3,481 Views)

 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.

0 Kudos
Message 14 of 43
(3,264 Views)

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

DAQ Product Marketing Engineer
National Instruments
0 Kudos
Message 15 of 43
(3,246 Views)

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!

0 Kudos
Message 16 of 43
(3,235 Views)

Great, glad you got it working again! 

 

Regards,

Jackie

DAQ Product Marketing Engineer
National Instruments
0 Kudos
Message 17 of 43
(3,224 Views)

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. 

 

 

0 Kudos
Message 18 of 43
(2,920 Views)

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.

0 Kudos
Message 19 of 43
(2,915 Views)

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.

lv_code.png

crashed.jpg

0 Kudos
Message 20 of 43
(2,877 Views)