en:docs:fapi:dosloadmodule

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
en:docs:fapi:dosloadmodule [2021/09/11 02:18] prokusheven:docs:fapi:dosloadmodule [2021/09/18 15:07] (current) prokushev
Line 1: Line 1:
 {{page>en:templates:fapiint}} {{page>en:templates:fapiint}}
  
 +====== DosLoadModule ======
 + 
 This call loads a dynamic link module and returns a handle for the module. This call loads a dynamic link module and returns a handle for the module.
  
-==Syntax==+===== Syntax ===== 
 <code c> <code c>
 DosLoadModule (ObjNameBuf, ObjNameBufL, ModuleName, ModuleHandle) DosLoadModule (ObjNameBuf, ObjNameBufL, ModuleName, ModuleHandle)
 </code> </code>
  
-==Parameters==+===== Parameters ===== 
 + 
 +  *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.
  
-  *ObjNameBuf (PSZ) - output: Address of the name of an object that contributed to the failure of DosLoadModule. +===== Return Code =====
-  *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.+
  
-==Return Code== +rc ([[USHORT]]) - return:Return code descriptions are:
-;rc (USHORT) - return:Return code descriptions are:+
  
   * 0  NO_ERROR   * 0  NO_ERROR
Line 46: Line 50:
   * 206 ERROR_FILENAME_EXCED_RANGE   * 206 ERROR_FILENAME_EXCED_RANGE
  
-==Remarks==+===== 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. 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.
Line 52: Line 57:
 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. 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.
  
-==Bindings== +===== Bindings ===== 
-===C===+ 
 +==== C ===
  
 <code c> <code c>
Line 68: Line 75:
 </code> </code>
  
-===MASM===+==== MASM ===
 <code asm> <code asm>
 EXTRN  DosLoadModule:FAR EXTRN  DosLoadModule:FAR
Line 82: Line 90:
 </code> </code>
  
-==Example==+===== Example ===== 
 This example loads a module. This example loads a module.
 <code c> <code c>