From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

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 can I perform this! Can anyone guide me regarding this option.

Thanks & regards,

Maithili
0 Kudos
Message 1 of 3
(2,566 Views)
I don't think that's possible.

Doug De Clue

Maithili wrote in message news:<50650000000800000015560000-1027480788000@exchange.ni.com>...
> Hello,
>
> I am calling a c++ dll from call library function. I want to pass a
> class pointer to call library function .
> How can I perform this! Can anyone guide me regarding this option.
>
> Thanks & regards,
>
> Maithili
0 Kudos
Message 2 of 3
(2,566 Views)
> I am calling a c++ dll from call library function. I want to pass a
> class pointer to call library function .
> How can I perform this! Can anyone guide me regarding this option.
>


I'm not sure whether you are passing a pointer to an instance or a
pointer to a class, but if the DLL has another function that returns the
pointer, then you can do this. Call the other DLL function, treat the
pointer as a U32, and pass it into the other functions that need it. In
this way, it is no different that any other refnum, HWND, HDC, or any
other private type.

If the DLL doesn't have a function to return this and you are wanting LV
to access globals/exported data within the DLL, then you are out of luck
at this time. LV only deals with exported functions.

G
reg McKaskle
0 Kudos
Message 3 of 3
(2,566 Views)