#define INCL_DOSMODULEMGR USHORT rc = DosLoadModule(ObjNameBuf, ObjNameBufL, ModuleName, ModuleHandle); PSZ ObjNameBuf; /* Address of object name buffer */ USHORT ObjNameBufL; /* Length of object name buffer */ PSZ ModuleName; /* Address of module name string */ PHMODULE ModuleHandle; /* Address of module handle (returned) */ USHORT rc; /* return code */
Example
This example loads a module.
#define INCL_DOSMODULEMGR #define MODULE_NAME "abcd" #define FULL_MODULE_NAME "\\nifty\\abcd.dll" CHAR LoadError[100]; HMODULE ModuleHandle; USHORT rc; if (DosLoadModule(LoadError, /* Object name buffer */ sizeof(LoadError), /* Length of object name buffer */ MODULE_NAME, /* Module name string */ &ModuleHandle) == 2) /* Module handle */