DosQueryProcType

Returns the type of the specified procedure within a dynamic link module. The type returned indicates whether the specified procedure is a 16-bit or 32-bit callable procedure.

Syntax
DosQueryProcType(hmod, ordinal, pszName, pulproctype)

Parameters

 * hmod (HMODULE) - input : The handle of the dynamic link module that contains the procedure.
 * ordinal (ULONG) - input : The ordinal number of the procedure whose type is desired.
 * If the ordinal number is nonzero, pszName is ignored.


 * pszName (PSZ) - input : The address of an ASCIIZ name string that contains the procedure name that is being referenced.
 * Calls to DosQueryProcType for entries within the DOSCALLS module are supported for ordinal references only. References to the DOSCALLS module by name strings are not supported, and will return an error. Dynamic link ordinal numbers for DOSCALLS routines are resolved by linking with OS2386.LIB.


 * pulproctype (PULONG) - output : The address of a ULONG in which the procedure type is returned.
 * The value returned in this field is one of the following:
 * 0 - PT_16BIT - Procedure is 16-bit.
 * 1 - PT_32BIT - Procedure is 32-bit.

Return Code

 * ulrc (APIRET) - returns:DosQueryProcType returns one of the following values:
 * 0 NO_ERROR
 * 6 ERROR_INVALID_HANDLE
 * 123 ERROR_INVALID_NAME
 * 182 ERROR_INVALID_ORDINAL

Remarks
If return code ERROR_INVALID_HANDLE is received, issue DosLoadModule and then issue DosQueryProcType again.

Example Code
This example loads the dynamic link module DISPLAY.DDL, queries its address and type, and finally frees it.

Related Functions

 * DosFreeModule
 * DosLoadModule
 * DosQueryModuleName
 * DosQueryProcAddr