LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to find functions in DLL Programmatically ??

Is there any way to find what are all the functions in DLL via LabVIEW. The DLL is also created in LabVIEW.

 

Thanks,

Nanda

0 Kudos
Message 1 of 4
(1,540 Views)

Hi Nanda,

 

open the DLL in the property dialog of the CLF node. After loading the DLL it will show you the function names in the "functions" pulldown menu...

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 2 of 4
(1,532 Views)

Hi GerdW,

 

I understand your point. But my as per my application, I need to keep changing the DLL dynamically and perform some task according to the functions in the DLL. As of now, consider I dont have the header files of the DLLs.

 

Thanks,

Nanda

0 Kudos
Message 3 of 4
(1,530 Views)

Finding functions programmatically in a DLL is not a trivial task. One method you could use is to use dumpbin. However, I believe that requires you to have the .lib file, but I may be mistaken on this. Dependency Walker will show you the DLL's functions, but I have no idea if it has a command-line equivalent you could use. The Image Help Library is another thing you could use. Good luck in trying to figure that one out.

 

Since you said you have a LabVIEW DLL just for fun I created a simple DLL with two VIs. I then opened the DLL file in a hex editor and searched for the VI names (i.e., the function names). Within the file the name of the DLL appears in 2 places. In the first location it is followed by each function's name, separated by a null character (to designate the end of the string). Thus, one method you could use is to simply open the file in binary mode and search for the name of the DLL. The names of the functions should occur right after that. I have no idea how full-proof this method is.

0 Kudos
Message 4 of 4
(1,508 Views)