LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calling C++ DLL to labview

Iam having a DLL written in C++.I would like to know how to call this C++ DLL to labview.I have seen CALL LIBRARY FUNCTION ,but there is no calling convention for C++.Is there any other method to call C++ DLL to labview.
0 Kudos
Message 1 of 3
(3,307 Views)
reddy wrote:

> Iam having a DLL written in C++.I would like to know how to call
> this C++ DLL to labview.I have seen CALL LIBRARY FUNCTION, but
> there is no calling convention for C++.

There exists no specific calling convention for C++ at all. Functions
are exported as __cdecl and under Windows also often __stdcall just as
normal C functions.

> Is there any other method to call C++ DLL to labview.

If you talk about export of C++ object interfaces, there is no common
convention about the memory layout of those interfaces nor their name
mangling conventions and consequently you can't really link C++
libraries created in one compiler into a project from a different
compiler. Because of this LabVIEW never has made an attempt to try to
provide an interface to C++ object interface pointers at all. DLLs also
do not provide a defined convention to export entire C++ object
interfaces other than exporting the individual object methods as normal
functions.

Alternatively under Windwos 32 bit, DLLs can implement Active X objects
which do have a formalized and strictly standardized interface to their
methods and attributes.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 2 of 3
(3,304 Views)
0 Kudos
Message 3 of 3
(3,301 Views)