LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

how do I know which functions are exported in dll?

I have a dll but I don't have .h and .lib file.
How do I know which functions are exported in that dll along with function prototypes?

Thanks for your help.
Sheetal
Thanks.
CVI 2010
LabVIEW 2011 SP1
Vision Builder AI 2011 SP1
0 Kudos
Message 1 of 3
(5,896 Views)
There are various utilities to read function names from DLLs. I don't know of any that can extract function prototypes.
CVI ships with the Dependency Walker, depends.exe in ..\CVI\sdk\bin (if you install the SDK) that will display function names. The version that ships with CVI6.0 typically generates an error (for an unresolved import) that can be ignored.
Microsoft Visual C++ ships with dumpbin.exe and depends.exe.
My favorite is a freeware product from Silurian software that acts as an add-on to Windows Explorer. Download it from http://www.silurian.com/win32/inspect.htm
As far as I can tell, none of these products can figure out the function prototypes. You'll need to go to the creator of the DLL for that info.
0 Kudos
Message 2 of 3
(5,889 Views)
Hello Sheetal,

Also depending on your OS, one way to see what is inside of a DLL is to use the "QuickView" utility that ships with Windows 98/95 and NT 4.0. QuickView will display the contents of the DLL in an "Export Table" section of its graphical window, but is not completely reliable. To use QuickView, just locate a DLL file using the Windows Explorer, right-click on the filename, and select QuickView. If this option is not available, you may need to install the QuickView utility from your Windows CD.

An alternative to QuickView, as Al S mentioned, is the "dumpbin" utility that comes with Microsoft Visual C++ (MSVC++). It's located in the msdev\bin directory and must be run from the command line. Before running the dumpbin executable, however, you may be required to set your environmental variables up so that dumpbin can find the appropriate DLL and support files by calling the vcvars32.bat file. Here's an example:

cd "C:\Program Files\Microsoft Visual Studio\VC98\Bin"vcvars32.batdumpbin /EXPORTS d:\cvi401\instr\scope.dll > exports.txt

Examine the part under the Exports header in the exports.txt file that is generated. Here you will find the symbols that are accessible externally. Note that the names may be "decorated". Compilers will change the symbols according to certain rules so that a linker can determine what the parameters and return types of the function are based on the decorated name. Your original function or variable name will still be visible, but it may have various characters appended or prepended to it because of this name decoration.

I hope that helps.


Thanks.
Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 3 of 3
(5,859 Views)