LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help, error occur when call a .net dll

I call a .net assembly in LV 8.0, the assembly is used for comunicate with insturment through usb port. but I got an error as below when I run the vi,

 

Error accessing property VPGCtrl.VPGCtrl.IsHighSpeed of ObjectId handle: 0xC2E1168 for obj 0x23F16EE[ControlAxSourcingSite [VPGCtrl.VPGCtrl]] in domain [LabVIEW Domain for Run] and thread 1744 >> Object reference not set to an instance of an object. in InitDevice1.vi

 

 the vpactrl.dll call another cyusb.dll ,it is usb driver of the instruments and located in sysytem32\driver directory. I am not familiar with call .net, I call the expamle of LV8 ,it works well, but my vi can't work.  plesase someone  help me here.  Thanks a lot.

0 Kudos
Message 1 of 3
(2,594 Views)
Where is the vpactrl.dll assembly in relation to the cyusb assembly? .NET does not work the same way as DLLs in terms of finding other required assemblies. See here: How the Runtime Locates Assemblies.
Message Edited by smercurio_fc on 06-04-2009 08:42 AM
Message 2 of 3
(2,585 Views)

smercurio_fc ,Thank you for your replay. I am not sure the problem is calling cyusb.dll , the vi is an example form vendor, they said it worked well on their computer. I did these steps to move it to my computer, can you or someone tell me whether there is some steps missing.

step 1,  install instrument driver cyusb.dll on my computer.

step 2,  copy the example project (the caller vi and  vpgctrl.dll) to my computer.

step 3,  when I open the vi, lv prompt the vpgctrl.dll is missing, I browse it at project directroy.(the example project put the vpgctrl.dll and caller vi at same directory and I did't change directroy structure when I copy it to my computer, but LV still said the dll is missing. It looks like LV begin to find it  from original computer path).  

step 4,  run , and then I got the error.

 

what's wrong or missing?

0 Kudos
Message 3 of 3
(2,568 Views)