Chapter 7 Creating and Distributing Standalone Executables and DL Ls
LabWindows/CVI Programmer Reference Manual 7-14
©
National Instruments Corporation
Do not include DLLs for National Instruments hardware in your distribution kit. The user
must install these DLLs from the distribution disks that National Instruments supplies.
If you use LoadExternalModule to load DLLs, refer to the following section, Rules for
Loading Files Using LoadExternalModule.
If you use a DLL file, a DLL path file, or a DLL glue object module in your project or as an
instrument driver, the Run-time Engine always looks for a corresponding DLL path (.pth)
file before it looks for the DLL itself. This search mechanism lets the user of your executable
place the DLLs anywhere on the target computer. The Run-time Engine uses the following
DLL search method.
1. Look for a .pth file in the directory of the executable. The .pth file must have the same
base name as the file in the project or as the instrument driver. If the .pth file contains
an absolute path to the DLL, use that path to find the DLL. If the .pth file contains a
simple filename, use the standard Windows DLL search algorithm: directory of
executables, current working directory, \windows, \windows\system, then the PATH
environment variable.
2. Look for a .dll file in the directory of the executable. The .dll file must have the same
base name as the file in the project or as the instrument driver.
3. Otherwise, use the standard Windows DLL search algorithm.
Note Before searching for a .dll file, the Run-time Engine always looks for a
.pth file. Therefore, your choice of whether to use a .pth file when you develop
your application in the LabWindows/CVI environment does not restrict your
choice of whether to use a .pth file in the standalone application.
Rules for Loading Files Using LoadExternalModule
LoadExternalModule can load the following file types:
Library Files: .lib (Windows) or .a (UNIX)
Object Modules: .obj (Windows) or .o (UNIX)
DLL Import Library Files: .lib (Windows 95/NT only)
DLL Path Files: .pth (Windows 3.1 only)
DLL Files: .dll (Windows 3.1 only)
Source Files: .c (linked into your executable or DLL)

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