Showing results for 
Search instead for 
Did you mean: 

Do I need Developer studio (C++ programming language) in my computer when I call a dll through my labview?

Go to solution

My problem is converting the c++ builder code to the dll...Because some lines (declarations) needs to be added above the code but I couldnt figure out where I need to put those...I think I need to ask a question like how can i make dll with builder to use in labview. 


0 Kudos
Message 21 of 48

Make it simpler: Go to a C Builder forum and ask how to create a DLL to be called from other C programs through LoadLibrary() and GetProcAddress().


Most LabVIEW programmers do not create DLLs and those that do use normally Visual C since it mostly just works. So asking here is not likely giving you much detailed feedback.


On the other hand chances that some C Builder users know LabVIEW are pretty minimalistic. So you have to go where C Builder expertise is, namely some C Builder forum, and ask a question they can understand. -> See above first sentence.

Rolf Kalbermatter
Averna BV
0 Kudos
Message 22 of 48

Try some of these C++ Builder forums as Rolf suggested:

LabVIEW Pro & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 23 of 48

Thank you friends...

0 Kudos
Message 24 of 48


 I am trying to use a dll in my labview that I created following online steps for a simple code. However, although I can see the function name correct, it does not calculate a value for return. These are pictures for my labview window. Representations are double, display formats are floating and  parameters are 8 bit double.

Do you have an idea why the return value is : NaN


Thank you 

0 Kudos
Message 25 of 48

Look in the LabVIEW Example Finder for the Call  It's a good way to learn how to setup conventions and parameters when using a CLFN.


There's also a good manual in LabVIEW Help called "Calling Code Written in Text-based Languages" (in the Fundamentals section).


Also, read this:


BTW, we can't help you very much unless you post your VIs and C++ code so we can look at how you setup your interface node.


LabVIEW Pro & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 26 of 48

Thanks NIquist,


I am still reading manual...


Here are the, C++ builder code and my labview... I couldnt attach the dll here....


Thank you....


Download All
0 Kudos
Message 27 of 48

Look at the prototype of your CLN setup:


double _BoxProperties(double Length, double Height, double Width);


And the one of your DLL function:


void BoxProperties(double L, double H, double W, double& A)


Forget about the prefixed underscore as that is the default name decoration for cdecl functions. Do you think there is a difference in the number of parameters and or return values??


And if you fix the Call Library Node configuration, make sure to configure the additional 4th parameter to be passed by reference (Pointer to Value).

Rolf Kalbermatter
Averna BV
0 Kudos
Message 28 of 48

" make sure to configure the additional 4th parameter to be passed by reference (Pointer to Value)."


I didnt understand this. I have 4 parameter one of them is return value, other 3 are inputs. which one is the Additional 4th parameter..Do  i need to add one more or change one of those to pointer to value?



0 Kudos
Message 29 of 48

Your DLL function does not return anything (void).  Probably (I didn't go through the DLL) it intends to put the results into the memory location pointed to by A.  You need to make sure the CLFN parameters match the ones in your DLL or else it will crash, or worse, NOT crash and subtly corrupt memory.

LabVIEW Pro & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 30 of 48