int UnloadExternalModule (int moduleID);
Invalidates a module ID obtained from LoadExternalModule.
After UnloadExternalModule is called, you cannot access the module through GetExternalModuleAddr or RunExternalModule.
If the module file is not in the project and not loaded as an instrument module, UnloadExternalModule removes the external module file from memory.
Use ReleaseExternalModule instead of UnloadExternalModule when multiple calls might have been made to LoadExternalModule on the same module and you do not want to unload the module in case other parts of the application still use it.
int module_id;
int status;
char *pathname;
pathname = "PROG.OBJ";
module_id = LoadExternalModule (pathname);
if (module_id <0)
FmtOut ("Unable to load %s\n", pathname);
else {
RunExternalModule (module_id, "");
UnloadExternalModule (module_id);
}
Input | ||
Name | Type | Description |
moduleID | integer | The value that LoadExternalModule returns, or -1. If moduleID is -1, LabWindows/CVI unloads all external modules. |
Name | Type | Description | ||||||||
status_id | integer | The result of the operation.
|