ReleaseExternalModule
- Updated2023-02-21
- 2 minute(s) read
ReleaseExternalModule
int ReleaseExternalModule (int moduleID);
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. |
Decreases the reference count for a module loaded using LoadExternalModule or LoadExternalModuleEx.
![]() |
Note This function is not supported for 64-bit applications. |
When you call LoadExternalModule successfully on a module, the module reference count increments by one. When you call ReleaseExternalModule, the module reference count decrements by one.
If the reference count decrements to zero, the module ID is invalidated and you cannot access the module through GetExternalModuleAddr or RunExternalModule. If, in addition, the module file is not in the project and not loaded as an instrument, ReleaseExternalModule removes the external module from memory.
If you want to unload the module regardless of the reference count, call UnloadExternalModule rather than ReleaseExternalModule. Use ReleaseExternalModule 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.
Parameters
Input | ||
Name | Type | Description |
moduleID | int | Module ID you obtain from LoadExternalModule or LoadExternalModuleEx. |
Return Value
Name | Type | Description | ||||||||||
result | int | The result of the operation.
|
Additional Information
Library: Utility Library
Include file: utility.h
LabWindows/CVI compatibility: LabWindows/CVI 4.0 and later