en:docs:fapi:dosgetprocaddr

Differences

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

Link to this comparison view

en:docs:fapi:dosgetprocaddr [2021/09/11 02:23] – created prokusheven:docs:fapi:dosgetprocaddr [2021/09/19 05:40] (current) prokushev
Line 1: Line 1:
 +{{page>en:templates:fapiint}}
 +====== DosGetProcAddr ======
 + 
 This call returns a far address to a desired procedure within a dynamic link module. This call returns a far address to a desired procedure within a dynamic link module.
  
-==Syntax==+===== Syntax =====
  
 <code c> <code c>
Line 7: Line 10:
 </code> </code>
  
-==Parameters==+===== Parameters ===== 
  
   *ModuleHandle ([[HMODULE]]) - input: Handle of the dynamic link module.   *ModuleHandle ([[HMODULE]]) - input: Handle of the dynamic link module.
-  *ProcName (PSZ) - input: Address of a name string that contains the referenced procedure name+  *ProcName ([[PSZ]]) - input: Address of a name string that contains the referenced procedure name.
-:Alternatively, if the selector portion of the pointer is null, the offset portion of the pointer is an explicit entry number (ordinal) within the dynamic link module. +
-:DosGetProcAddr for entries within the DOSCALLS module are only supported for ordinal references. References to the DOSCALLS module by name strings are not supported and return an error. Dynamic link ordinal numbers for DOSCALLS routines are resolved by linking with DOSCALLS.LIB. +
-  *ProcAddress (PFN FAR *) - output: Procedure address.+
  
-==Return Code== +Alternatively, if the selector portion of the pointer is null, the offset portion of the pointer is an explicit entry number (ordinal) within the dynamic link module. 
-;rc (USHORT) - return:Return code descriptions are:+ 
 +DosGetProcAddr for entries within the DOSCALLS module are only supported for ordinal references. References to the DOSCALLS module by name strings are not supported and return an error. Dynamic link ordinal numbers for DOSCALLS routines are resolved by linking with DOSCALLS.LIB. 
 +  *ProcAddress ([[PFN]] FAR *) - output: Procedure address. 
 + 
 +===== Return Code ===== 
 + 
 +rc ([[USHORT]]) - return:Return code descriptions are:
  
   * 0  NO_ERROR   * 0  NO_ERROR
Line 23: Line 30:
   *127 ERROR_PROC_NOT_FOUND   *127 ERROR_PROC_NOT_FOUND
  
-==Remarks==+===== Remarks ===== 
  
 A 32-bit address, consisting of a selector and offset, is returned for a specified procedure. A 32-bit address, consisting of a selector and offset, is returned for a specified procedure.
Line 31: Line 39:
 Other run-time dynamic link calls are [[DosLoadModule]], [[DosGetModName]], and [[DosGetModHandle]]. Other run-time dynamic link calls are [[DosLoadModule]], [[DosGetModName]], and [[DosGetModHandle]].
  
-==Bindings== +===== Bindings ===== 
-===C===+ 
 +====C====
 <code c> <code c>
 #define INCL_DOSMODULEMGR #define INCL_DOSMODULEMGR
Line 44: Line 53:
 USHORT   rc;            /* return code */ USHORT   rc;            /* return code */
 </code> </code>
-===MASM===+====MASM====
 <code asm> <code asm>
 EXTRN  DosGetProcAddr:FAR EXTRN  DosGetProcAddr:FAR
Line 59: Line 68:
 [[http://www.edm2.com/index.php/DosGetProcAddr]] [[http://www.edm2.com/index.php/DosGetProcAddr]]
  
 +{{page>en:templates:fapi}}