Format
#include <stdlib.h> int _freemod(unsigned long module_handle);
Language Level: Extension
_freemod frees all references to a dynamic link library (DLL) for
the calling process. It is the counterpart of the _loadmod
function, which loads a DLL for the process. The module_handle
is the module handle of the DLL, which was returned by _loadmod.
Note: For OS/2, _loadmod and _freemod perform exactly
the same function as the OS/2 APIs DosLoadModule and
DosFreeModule. They are provided for compatibility with earlier
C/C++ run-time library releases only, and will not be supported
in future versions. Use DosLoadModule and DosFreeModule instead.
For more details on these APIs, see the Control Program
Guide and Reference.
Note:
For Windows, _loadmod and _freemod perform exactly the same
function as the Windows APIs LoadLibrary and FreeLibrary. They
are provided for compatibility with earlier C/C++ run-time
library releases only, and will not be supported in future
versions. Use LoadLibrary and FreeLibrary instead. For more
details on these APIs, see the Win32 Programmer's Reference.
Return Value
_freemod returns 0 if successful. If not, _freemod
returns -1 and sets errno to EOS2ERR.
![]()
_loadmod -- Load DLL
<stdlib.h>
/Ge compiler option