Jump to content

DspQueryDriverInfo: Difference between revisions

From EDM2
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
DspQueryDriverInfo allows the caller to query driver information about any PM display driver that has been registered with the operating system (by using DspSetDriverInfo).  
DspQueryDriverInfo allows the caller to query driver information about any PM display driver that has been registered with the operating system (by using [[DspSetDriverInfo]]).
 
==Syntax==
==Syntax==
  DspQueryDriverInfo(pDSPInfo, flOptions);
  DspQueryDriverInfo(pDSPInfo, flOptions);
==Parameters==
==Parameters==
;pDSPInfo (PDSPINFO) - input  
;pDSPInfo ([[PDSPINFO]]) - input:Pointer to a data structure.
:Pointer to a data structure.  
;flOptions (ULONG) - input:The following flags are used to specify various options:
:A pointer to a PDSPINFO data structure that contains the following values:
::DSP_QUERY_OPT_PARMS: Get the optional parameters. The default does not query optional parameters. If this flag is not set, pszOptionalParameters is set to NULL.
 
::DSP_QUERY_CURRENT_DRIVER: Get information about the current driver. In this case, no driver name is specified; instead, the name of the current driver is returned in pszDriverName.
:;pszDriverName
::DSP_QUERY_DEFAULT_DRIVER: Get information about the default driver. In this case, no driver name is specified; instead, the name of the default driver is returned in pszDriverName.
:: A NULL-terminated string containing the name of the driver. All IBM drivers should start with "IBM", as in IBMVGA or IBMXGA.
 
:;cchDriverName
:: Length of the pszDriverName buffer.
 
:;pszDesc
:: Pointer to a string describing the driver. This description is used by the program that lists the available drivers and that gives information as to which driver is loaded.
 
:;cchDesc
:: Length of the pszDesc buffer.
 
:;pszFileName
:: The fully qualified path name (drive, path, and file name) of the display driver DLL.
 
:;cchFileName
:: Length of the pszFileName buffer.
 
:;pszOptionalParameters
:: Pointer to a string of optional parameters, which might be known only to the device driver.
 
:;cchOptionalParameters
:: Length of the pszOptionalParameters buffer.
 
;flOptions (ULONG) - input  
:The following flags are used to specify various options:  
 
:;DSP_QUERY_OPT_PARMS  
::Get the optional parameters. The default does not query optional parameters. If this flag is not set, pszOptionalParameters is set to NULL.  
 
:;DSP_QUERY_CURRENT_DRIVER  
:: Get information about the current driver. In this case, no driver name is specified; instead, the name of the current driver is returned in pszDriverName.  
 
:;DSP_QUERY_DEFAULT_DRIVER  
:: Get information about the default driver. In this case, no driver name is specified; instead, the name of the default driver is returned in pszDriverName.


==Return Code==
==Return Code==
; fSuccess (BOOL) - returns  
;fSuccess (BOOL) - returns:Return codes.
:Return codes.  
:On completion, this installation routine must return BOOLEAN (fSuccess).
 
:*TRUE Success
On completion, this installation routine must return BOOLEAN (fSuccess).  
:*FALSE Error.
 
TRUE Success  
FALSE Error.  
 
Possible Errors Detected:  When an error is detected, the handling routine must call WinGetLastError to post the condition. Error codes for conditions that the handling routine is expected to check are as follows:
* PMERR_INVALID_PARAMETER
* PMERR_MEMORY_ALLOC
* PMERR_MEMORY_ALLOCATION_ERR
* PMERR_MEMORY_DEALLOCATION_ERR


Possible Errors Detected: When an error is detected, the handling routine must call WinGetLastError to post the condition. Error codes for conditions that the handling routine is expected to check are as follows:
* PMERR_INVALID_PARAMETER
* PMERR_MEMORY_ALLOC
* PMERR_MEMORY_ALLOCATION_ERR
* PMERR_MEMORY_DEALLOCATION_ERR


==Remarks==
==Remarks==
Display drivers can be identified explicitly by name. If the DSP_QUERY_DEFAULT_DRIVER flag is set, the information for the default driver is returned. If the DSP_QUERY_CURRENT_DRIVER flag is set, the information for the current driver is returned. Otherwise, the information on the given driver is returned.  
Display drivers can be identified explicitly by name. If the DSP_QUERY_DEFAULT_DRIVER flag is set, the information for the default driver is returned. If the DSP_QUERY_CURRENT_DRIVER flag is set, the information for the current driver is returned. Otherwise, the information on the given driver is returned.
 
==Example Code==
<PRE>
#include <os2.h>
 
PDSPINFO    pDSPInfo;  /*  Pointer to a data structure. */
ULONG      flOptions;
BOOL        fSuccess;  /*  Return codes. */
 
fSuccess = DspQueryDriverInfo(pDSPInfo, flOptions);
 
</PRE>


[[Category:Gre]]
[[Category:Gre]]

Latest revision as of 08:04, 5 March 2020

DspQueryDriverInfo allows the caller to query driver information about any PM display driver that has been registered with the operating system (by using DspSetDriverInfo).

Syntax

DspQueryDriverInfo(pDSPInfo, flOptions);

Parameters

pDSPInfo (PDSPINFO) - input
Pointer to a data structure.
flOptions (ULONG) - input
The following flags are used to specify various options:
DSP_QUERY_OPT_PARMS: Get the optional parameters. The default does not query optional parameters. If this flag is not set, pszOptionalParameters is set to NULL.
DSP_QUERY_CURRENT_DRIVER: Get information about the current driver. In this case, no driver name is specified; instead, the name of the current driver is returned in pszDriverName.
DSP_QUERY_DEFAULT_DRIVER: Get information about the default driver. In this case, no driver name is specified; instead, the name of the default driver is returned in pszDriverName.

Return Code

fSuccess (BOOL) - returns
Return codes.
On completion, this installation routine must return BOOLEAN (fSuccess).
  • TRUE Success
  • FALSE Error.

Possible Errors Detected: When an error is detected, the handling routine must call WinGetLastError to post the condition. Error codes for conditions that the handling routine is expected to check are as follows:

  • PMERR_INVALID_PARAMETER
  • PMERR_MEMORY_ALLOC
  • PMERR_MEMORY_ALLOCATION_ERR
  • PMERR_MEMORY_DEALLOCATION_ERR

Remarks

Display drivers can be identified explicitly by name. If the DSP_QUERY_DEFAULT_DRIVER flag is set, the information for the default driver is returned. If the DSP_QUERY_CURRENT_DRIVER flag is set, the information for the current driver is returned. Otherwise, the information on the given driver is returned.