LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert DLL file to LabVIEW APIs

Solved!
Go to solution

Is it possible to convert Dll files to LabVIEW APIs automatically?

0 Kudos
Message 1 of 3
(2,015 Views)
Solution
Accepted by topic author phoenix-karthik

Yes.

See here…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 3
(2,005 Views)

@GerdW wrote:

Yes.

See here…


There should be one big warning though: Do not start down that path if you are not able to go through every single VI afterwards and making sure it is correct!

 

The C syntax in the header file that the wizard uses to generate the code is simply not up to the task to define things like memory management and similar stuff. So the wizard has to make many assumptions and despite its name it can NOT do magic.

In the best case the code is sometimes rather inefficient as it attempts to be rather safe than sorry but in just as many cases it simply can not safely deduce what is needed and just has to do something that might or might not be correct. Without the knowledge to create such a library from scratch manually you won't be able to verify that the created code is correct. It may seem to work but there can and usually are several time bombs in the resulting VI library that will at some time go off, by corrupting memory buffers in certain situations that may either produce strange results or send the whole LabVIEW process into the General Protection Fault nirvana.

 

A lot of this information has to be gained from reading the actual programmer manual (something the wizard can't do obviously) or from analyzing example code (C or C++) that uses the library. Sometimes the naming of the variables can also give hints to an experienced programmer, but it can also be misleading if the original library programmer was himself a bit of a noob.

 

Rolf Kalbermatter
My Blog
Message 3 of 3
(1,957 Views)