LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating and Calling LabVIEW DLLs with Various Data Types from Visual C++

Hi there,
is it possible to pass a (pointer to an) image from c++ to a LV6i created dll and how should this be done?

I'm familiar with using external dlls in LV (passing numbers and pointers only), but I've never done it the other way around.

Thanks for your help,
\Ulli.
0 Kudos
Message 1 of 2
(2,828 Views)
There is some discussion here about using DLLs created by LabVIEW.

I'll give you some hints about problems using DLLs from non LV development environments.

1. It is easy to use simple data types as in the NI examples. Simple data types mean integer, boolean, string.

2. If you have complex data types like arrays or clusters you need to use the LV memory management functions to allocate the memory for this data.

3. You can't use all functions within your LV created DLL. I know from my own experience that the "old" serial VIs need LabVIEW as the main process.

Here are some links to discussions I had found about LV created DLLs.

error 998 calling DLL

Labview.lib was not called from a Labview process

As I decided to use only simple data types I don't know something about the LV memory management functions. A good way to start is the CIN tool documentation. You must have choosen CIN tool during installation of your LabVIEW or complete installation.

The VISA serial VIs work in LV created DLLs. I use it from a MS Visual C++ application.

I hope I could give you a starting point,
Waldemar
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 2 of 2
(2,828 Views)