LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What does LabVIEW need to automatically generate a prototype for a DLL function

Solved!
Go to solution

I am working with some DLLs that are being used in my companies TestStand/ CVI environment.

I decided to try using them with LabVIEW using the call library function.

I was pleasantly surprised by the fact that the prototype was automatically generated.

In the past I have always had to add the parameters one at a time.

I was wondering what is the difference from when LabVIEW can generate the prototype and when I have to do it myself?

 

 

0 Kudos
Message 1 of 4
(2,865 Views)
Solution
Accepted by topic author RustyStrings

This occurs if your DLL has an associated type library. Sometimes these are separate files (.tlb), but they may be included inside the .dll, so you won't always see it.

 

CVI (also LabVIEW) has an option when you build a dll to include a type library. Don't know why you wouldn't, it makes everyone's life much easier.

I expect your companies CVI developers are just helpful. You'll see the same behaviour in TestStand where the parameters are detected.

Ian
LabVIEW since 2012
0 Kudos
Message 2 of 4
(2,838 Views)

 

Thanks

 

I suspected that this was the case.

I don't see any separate .tlb files so it must be built into the DLL

As you said this makes things much easier

 

0 Kudos
Message 3 of 4
(2,822 Views)

Please note that this is an NI specific extension to DLLs. They had this mechanisme developed for LabWindows CVI created instrument drivers already and someone apparently decided that it's a nice feature to have this CVI FP interface description added to the DLL as a custom resource and add support to LabVIEW to recognize this resource and use it.

However don't expect to find this in DLLs from other manufacturers unless they used LabWindows CVI to develop that DLL.

What is known under Windows as Type Library is typically used for (D)COM/ActiveX interface definitions. And that can be either distributed as a seperate .tlb file or embedded in the DLL as a resource.

Rolf Kalbermatter
My Blog
Message 4 of 4
(2,627 Views)