Chapter 8 Utility Library
© National Instruments Corporation 8-53 LabWindows/CVI Standard Libraries
Parameters
Input pathName string Relative or absolute pathname of the module to
be loaded.
callingModuleHandle void
pointer Usually, the module handle of the calling DLL.
You can use __CVIUserHInst. Zero
indicates the project or executable.
Return Value
moduleId integer ID of the loaded module.
Return Codes
Same as the return codes for LoadExternalModule.
Using this Function
Refer to the function help for LoadExternalModule for detailed information on that
function.
When you call LoadExternalModule on an object or library module, external references
need to be resolved. They are resolved using symbols defined in the project or in object, library,
or DLL import library modules that have already been loaded using LoadExternalModule
(or LoadExternalModuleEx). This is true even if you call LoadExternalModule from
a DLL.
You may want to load an object or library module from a DLL and have the module link back to
symbols that you defined in (but did not export from) the DLL. You can do this using
LoadExternalModuleEx. You must specify the module handle of the DLL as the
callingModuleHandle parameter. You can do so by using the LabWindows/CVI pre-defined
variable __CVIUserHInst.
LoadExternalModuleEx first searches the global DLL symbols to resolve external
references. Any remaining unresolved references are resolved by searching the symbols defined
in the project or in object, library, or import library modules that have already been loaded using
LoadExternalModule (or LoadExternalModuleEx).
LoadExternalModuleEx expects the DLL to contain a table of symbols that can be used to
resolve references. If you create the DLL in LabWindows/CVI, the table is included
automatically. If you create the DLL using an external compiler, you must arrange for this table
to be included in the DLL. You can do this by creating an include file that includes all of the
symbols that need to be in this table. You can then use the External Compiler Support