ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems on building a DLL with 2D array input

Hi everybody,

I am trying to build a DLL that has in input a 2D array of doubles, anything seems to work fine and the DLL is created. Unfortunately there's no way to use it inside another vi: it crashes LV.
I developed others DLL that pass different kind of data, but not arrays in input.
I attach here a simple example that shows how I am trying to build and use the DLL.
- Could anybody tell me what is wrong in it? ( Watch-out; the exec-Dll.vi crashes LV when executed!)
- If I change the calling conventions to StdCall, could I use this Dll in Visual Basic, or Visual C?

Thanks a lot in advance
0 Kudos
Message 1 of 3
(2,941 Views)
You have to supply the C/C++ source for the DLL. Can't find your problem otherwise, but I guess you are dereferencing the handle a bit wrong.
0 Kudos
Message 2 of 3
(2,941 Views)
Andalu;

I think in your function prototype, it should say "TD1Hdl arrayIN" instead of "TD1Hdl *arrayIN".

The following example is an excellent reference:

Passing a Variety of Data Types from DLL to LabVIEW

Best regards;
Enrique
www.vartortech.com
0 Kudos
Message 3 of 3
(2,941 Views)