LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to write a Com-based dll in C++ and call it in Labview

I have C++ functions that have classes (Object Oriented programming). I want to make dll libraries of these functions in C++ and call these functions one at a time in Labview. I have been advised not to use "call library function node" procedure. Instead make a com based dll in c++ and call it in Labview, how that works? I will appreciate if somebody who has that knowledge gives some concrete details.

 

Thanks!

khurshe

0 Kudos
Message 1 of 3
(2,620 Views)

Hi khurshe,

 

  The "optimal" solution is highly depends on your task. I would write it as following:

 

1) Do you need a graphical output from your functions (for example custom graph) ?

[yes] use .NET/ActiveX  

[no]  use C wrapper

 

2) Do your application cross platform? - if yes use a C wrapper.

 

 

In general COM solution is a much more headache then a C wrapper.

If you provide more details, we would available to help you better.

 

Michael.

_________________________________________________________________________________________________
LV 8.2 at Windows & Linux


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

We wrote a class called Testclass A in Borland C++ that we want to call from Labview in "call library function". and to do this we wrote a c_wrapper for Testclass A. But it does not work in "call library function node".After configuring and attaching the indicators and controls to "call Library function node" the Labview array remains broken and clicking on the broken arrow says " function not found in the dll library. I have attached the code and header file for kind attention for anybody who can help.

 

Thanks!

Khurshe

Download All
0 Kudos
Message 3 of 3
(2,595 Views)