Chapter 3 Windows95/NT Compiler/Linker Issues
LabWindows/CVI Programmer Reference Manual 3-2
©
National Instruments Corporation
DLLs for Instrument Drivers and User Libraries
Under Windows 95/NT, LabWindo ws/CVI does not directly associate DLLs with instrument
drivers or user libraries. However, LabWindows/CVI can associate instrument drivers and
user libraries with DLL import libraries. Each DLL must have a DLL import library (.lib)
file. In general, if the program for an instrument driver or user library is in the form of a DLL,
you must place the DLL import library in the same directory as the function panel (.fp) file.
The DLL import library specifies the name of the DLL that LabWindows/CVI searches for
using the standard Windows DLL search algorithm.
LabWindows/CVI makes an exception to facilitate using VXIplug&play instrument driver
DLLs. When you install a VXIplug&play instrument driver, the installation program
does not place the DLL import library in the same directory as the .fp file. If a .fp file
is in the VXIplug&play directory, LabWindows/CVI searches for an import library in
the VXIplug&play library directory before it looks for a program file in the directory of
the .fp file, unless you list the program file in the project.
Using The LoadExternalModule Function
When you use the LoadExternalModule function to load a DLL at run time, you must
specify the pathname of the DLL import library, not the name of the DLL.
Link Errors when Using DLL Import Libraries
A DLL import library must not contain any references to symbols that the DLL does not
export. If it does, LabWindows/CVI reports a link error. If you load the DLL using
LoadExternalModule, the GetExternalModuleAddr function reports an undefined
references (–5) error. You can solve this problem by using LabWindows/CVI to generate an
import library. Refer to the Generating an Import Library discussion later in this section.
DLL Path (.pth) Files Not Supported
The DLL import library contains the filename of the DLL. LabWindows/CVI uses the
standard Windows DLL search algorithm to find the DLL. Thus, DLL path (.pth)
files do not work under Windows95/NT.
16-Bit DLLs Not Supported
LabWindows/CVI for Windows95/NT does not load 1 6-bit DLLs. If you want to do this, you
must obtain a 32-to-16-bit thunking DLL and a 32-bit DLL import library.
Run State Change Callbacks in DLLs
You can include run state change callbacks in DLLs you build in LabWindows/CVI. When
running a program in LabWindows/CVI, a run state change callback receives notification
when the program starts, suspends, resumes, and stops. If you include a run state change

00ProRef.book : 06chap03.fm Page 2 Monday, March 9, 1998 3:23 PM