Jump to content

DiveQueryCaps

From EDM2

This function returns static information about the characteristics and capabilities of the display hardware and available driver functions. This function can be called without performing a DiveOpen call.

Syntax

_DiveQueryCaps(pDiveCaps, ulPlaneBufNum)

Parameters

pDiveCaps (PDIVE_CAPS) - input
Pointer to DIVE_CAPS. This structure defines the color-conversion capabilities of the DIVE component.
ulPlaneBufNum (ULONG) - input
Indicates the plane for which information is to be returned:
  • DIVE_BUFFER_SCREEN Return information for graphics plane. This is the default.
  • DIVE_BUFFER_GRAPHICS_PLANE Return information for graphics plane.
  • DIVE_BUFFER_ALTERNATE_PLANE Return information for overlay plane, if present.

Returns

rc (ULONG) - returns
Return codes indicating success or type of failure:
  • DIVE_SUCCESS If the function succeeds, 0 is returned.
  • DIVE_ERR_INSUFFICIENT_LENGTH The *pFormatData* of length *ulFormatLength* (specified in the DIVE_CAPS structure) is not large enough for the total number of input and output formats.

Remarks

This function indicates whether direct access through DIVE is possible. A list of input and output color formats supported by the blitter is returned. Some of these might be assisted through hardware color conversion; however, this detail is hidden from the user as the display engine will provide hardware assistance, if present.

If the length of the format buffer specified in *ulFormatLength* of DIVE_CAPS is insufficient to contain all of the supported input and output formats, **DIVE_ERR_INSUFFICIENT_LENGTH** is returned, and the field is updated with the required length.

Example Code

#include <dive.h>

PDIVE_CAPS pDiveCaps; /* Pointer to data structure. */
ULONG ulPlaneBufNum;  /* Indicates plane. */
ULONG rc;             /* Return codes. */

rc = DiveQueryCaps(pDiveCaps, ulPlaneBufNum);