RunExternalModule
- Updated2023-02-21
- 2 minute(s) read
RunExternalModule
int RunExternalModule (int moduleID, const char buffer[]);
Purpose
![]() |
Note This class of functions is deprecated. National Instruments recommends that you instead use the Windows SDK functions LoadLibrary and GetProcAddress to load external modules. These functions allow you to load Windows DLLs, but not compiled object modules or libraries. |
Calls the pre-defined entry point function in an external object module that was loaded using LoadExternalModule.
![]() |
Note This function is not supported for 64-bit applications. |
RunExternalModule requires that the module define the following function:
void _xxx_entry_point (char [])
where xxx is the base name of the file, in lowercase. For example, if the pathname of the file is C:\LW\PROGRAMS\TEST01.OBJ, the name of the entry point must be _test01_entry_point.
Example Code
int module_id;
int status;
char *pathname;
pathname = "EXTMOD.OBJ";
module_id = LoadExternalModule (pathname);
if (module_id <0)
FmtOut ("Unable to load %s\n", pathname);
else {
RunExternalModule (module_id, "");
UnloadExternalModule (module_id);
}
Parameters
Input | ||
Name | Type | Description |
moduleID | int | The value returned by LoadExternalModule. |
buffer | const char [] | A buffer used to pass information to and from the external module entry point function. |
Return Value
Name | Type | Description | ||||||||||||||||||
result | int | Indicates the result of the operation.
|
Additional Information
Library: Utility Library
Include file: utility.h
LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later