This call frees the reference to a dynamic link module for a process. When the dynamic link module is no longer needed by any process, the module is freed from system memory.
DosFreeModule
ModuleHandle (HMODULE) - input
The module identified by the handle must be loaded through DosLoadModule. An error is returned if the handle is invalid.
If any exit list routines were registered as a result of this module being loaded, the module may not be freed and ERROR_INVALID_ACCESS may be returned.
When DosFreeModule returns to the caller, the module handle is no longer valid and is not used to reference the dynamic link module. Procedure entry addresses returned for this module are no longer valid and cause a protection fault if they are invoked.