From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing a class pointer to Call library function

Hello,

I am calling a c++ dll from call library function. I want to pass a class pointer to call library function .
How van I perform this! Can anyone guide me regarding this option.

Thanks & regards,

Maithili
0 Kudos
Message 1 of 6
(3,358 Views)
LabVIEW does not have an equivalent to C++ classes as a data type. It support Windows SDK and ActiveX data types, as well as all basic C data types. You can't pass classes to LabVIEW though. You should pull out the member data of the class that you need to pass to LabVIEW and send those items separately.

Best Regards,

Chris Matthews
National Instruments
0 Kudos
Message 2 of 6
(3,358 Views)
Can't I even pass a pointer to class? As we can pass a pointer to value . Is there any similar option. I changed the input to adapt to type but I am not able to find out how can I pass that pointer using a control
0 Kudos
Message 3 of 6
(3,358 Views)
No, there is no type in LabVIEW that will adapt to the class pointer. You can just use a int32 to get in the 4-byte memory location, but you wouldn't be able to do anything with it in LabVIEW. Are you just trying to pass it through LabVIEW and back to another DLL call?

Chris
0 Kudos
Message 4 of 6
(3,358 Views)
I am trying to pass it to call library function so that it should pass it to a dll file and not another dll call. Basically this is a dll file for reading TDC-PCI card. It came up with the card. I want to read the data from the TDC card.
Can you give any other suggestion through which I can perform this!

Thanks & regards,

Maithili
0 Kudos
Message 5 of 6
(3,358 Views)
Unfortunately, you will not be able to call that DLL directly from LabVIEW since it has unsupported data types in the argument lists. You would need to write a wrapper DLL in Visual C++ or another C++ compiler that exposes functions with basic data types (strings, numerics, arrays, etc.) and call that wrapper DLL from LabVIEW.

Chris
0 Kudos
Message 6 of 6
(3,358 Views)