DosLoadModule
Bindings: C, MASM
This call loads a dynamic link module and returns a handle for the module.
DosLoadModule (ObjNameBuf, ObjNameBufL, ModuleName, ModuleHandle)
ObjNameBuf (PSZ) - output
Address of the name of an object that contributed to the failure of
DosLoadModule.
ObjNameBufL (USHORT) - input
Length, in bytes, of the buffer described by ObjNameBuf.
ModuleName (PSZ) - input
Address of the ASCIIZ name string containing the dynamic link module
name or the pathname string. The filename extension used for dynamic
link libraries is .DLL. When a pathname is provided, the module name
may have any extension. The internal module name (the name given in
the LIBRARY statement in the .DEF file) must be the same as the
filename without the extension.
ModuleHandle (PHMODULE) - output
Address of the handle for the dynamic link module.
rc (USHORT) - return
Return code descriptions are:
0 NO_ERROR
2 ERROR_FILE_NOT_FOUND
3 ERROR_PATH_NOT_FOUND
4 ERROR_TOO_MANY_OPEN_FILES
5 ERROR_ACCESS_DENIED
8 ERROR_NOT_ENOUGH_MEMORY
11 ERROR_BAD_FORMAT
26 ERROR_NOT_DOS_DISK
32 ERROR_SHARING_VIOLATION
33 ERROR_LOCK_VIOLATION
36 ERROR_SHARING_BUFFER_EXCEEDED
95 ERROR_INTERRUPT
108 ERROR_DRIVE_LOCKED
123 ERROR_INVALID_NAME
127 ERROR_PROC_NOT_FOUND
180 ERROR_INVALID_SEGMENT_NUMBER
182 ERROR_INVALID_ORDINAL
190 ERROR_INVALID_MODULETYPE
191 ERROR_INVALID_EXE_SIGNATURE
192 ERROR_EXE_MARKED_INVALID
194 ERROR_ITERATED_DATA_EXCEEDS_64k
195 ERROR_INVALID_MINALLOCSIZE
196 ERROR_DYNLINK_FROM_INVALID_RING
198 ERROR_INVALID_SEGDPL
199 ERROR_AUTODATASEG_EXCEEDS_64k
201 ERROR_RELOC_CHAIN_XEEDS_SEGLIM
206 ERROR_FILENAME_EXCED_RANGE
Remarks
If the file is an OS/2 dynamic link module, it is loaded, and a handle is
returned. This handle is used for freeing the dynamic link module with a
DosFreeModule request, getting procedure addresses with DosGetProcAddr
requests, and getting the fully qualified file name with a DosGetModName
request.
DosLoadModule may not be called from a dynamic library initialization
routine if the module to be loaded or any module referenced by it
contains a dynamic link library initialization routing.
Created using Inf-PHP v.2 (c) 2003 Yuri Prokushev
Created using Inf-HTML v.0.9b (c) 1995 Peter Childs