LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can i use malloc function while using DLL created from C program

Hi,
I have written a simple program in C , which uses malloc function for allocating memory for the array.When iam calling that DLL using call library function node in labview, it is not giving any output, my doubt is can we use malloc function in C program from which we will create DLL and is called in labview? I am attaching my C code and DLL and also labview file please tell me where i am doing wrong?

Thanks & Regards,
Vishnu
0 Kudos
Message 1 of 2
(3,660 Views)
Hi Vishnu,

There's no problem using the Malloc function in C and call it as a DLL in LabVIEW.
But LabVIEW has a different memory management than C.
It is probably not recommended to allocate array memory in C for labVIEW arrays
You can use initialize array in LabVIEW instead.

Good luck
Van L
NI Applications Engineer
0 Kudos
Message 2 of 2
(3,623 Views)