Chapter 8 Utility Library
© National Instruments Corporation 8-63 LabWindows/CVI Standard Libraries
Parameter Discussion
moduleID is the value LoadExternalModule returns. buffer is a character array in
which you can pass information to and from the module.
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 as follows:
C:\LW\PROGRAMS\TEST01.OBJ
then the name of the entry point must be:
_test01_entry_point
Example
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);
}
SetBreakOnLibraryErrors
int oldState = SetBreakOnLibraryErrors (int newState);
Purpose
When debugging is enabled and a National Instruments library function reports an error,
LabWindows/CVI can display a runtime error dialog box and suspend execution. You can use
this function to enable or disable this feature.
In general, it is best to use the Break on library errors checkbox in the Run Options command
of the Project window to enable or disable this feature. You should use this function only when
you want the temporarily disable the Break on library errors feature around a segment of code.
This function does not affect the state of the Break on library errors checkbox in the Run
Options command of the Project window.