Utility Library Chapter 8
LabWindows/CVI Standard Libraries 8-50 © National Instruments Corporation
Return Codes (Continued)
-21 Could not load the DLL.
-22 Could not find the DLL header file.
-23 Could not load the DLL header file (out of memory or the file is corrupted).
-24 Syntax error in the DLL header file.
-25 DLL initialization function failed.
-26 Module already loaded with different calling module handle. (See
LoadExternalModuleEx.)
-27 Invalid calling module handle. (See LoadExternalModuleEx.)
-28 Module loaded in Borland mode in the LabWindows/CVI development
environment contains uninitialized global variables that are also defined in other
modules.
Parameter Discussion
This function loads an external object module file. The file need not be listed in your project nor
loaded as an instrument module.
Under Windows 3.1, the file may be an object file (.obj), a library file (.lib), or a
dynamically linked library (.dll). Object and library modules must be compiled with the
Watcom C compiler for Windows or the LabWindows/CVI compiler.
Under Windows 95 and NT, the file may be an object file (.obj), a library file (.lib), or a
DLL import library (.lib). You cannot load a DLL directly. Object and library modules can be
compiled in LabWindows/CVI or an external compiler.
In UNIX, the file may be an object file (.o) or a statically linked library (.a).
All files must conform to the rules for loadable compiled modules in the LabWindows/CVI
Programmer Reference Manual.
By loading external object modules, you can execute code that is not in your project and not in a
loaded instrument module. You can load the external modules only when needed and unload
them when they are no longer needed.
After a module has been loaded, you can execute its code in one of two ways:
• You can obtain pointers to functions in the module by calling
GetExternalModuleAddr. You can then call the module's functions through the
function pointers.