DXGKCB_QUERY_SERVICES callback function (dispmprt.h)

The DxgkCbQueryServices function returns an interface implemented by the display port driver.

Syntax

DXGKCB_QUERY_SERVICES DxgkcbQueryServices;

NTSTATUS DxgkcbQueryServices(
  [in]      HANDLE DeviceHandle,
  [in]      DXGK_SERVICES ServicesType,
  [in, out] PINTERFACE Interface
)
{...}

Parameters

[in] DeviceHandle

A handle that represents a display adapter. The display miniport driver previously obtained this handle in the DeviceHandle member of the DXGKRNL_INTERFACE structure that was passed to DxgkDdiStartDevice.

[in] ServicesType

A constant from the DXGK_SERVICES enumeration that specifies which interface is being requested.

[in, out] Interface

A pointer to an INTERFACE structure that receives the requested interface.

Return value

DxgkCbQueryServices returns STATUS_SUCCESS if it succeeds. Otherwise, it returns one of the error codes defined in Ntstatus.h.

Remarks

An interface, in this context, is a set of functions implemented by the display port driver. The display port driver makes the functions of an interface available to other drivers by providing function pointers in response to DxgkCbQueryServices.

Obtaining the AGP interface

To obtain an Accelerated Graphics Port (AGP) interface, do the following:

  1. Allocate a DXGK_AGP_INTERFACE structure.

  2. Set the Size member to sizeof(DXGK_AGP_INTERFACE).

  3. Set the Version member. Version constants are defined in Dispmprt.h (for example, DXGK_AGP_INTERFACE_VERSION_1).

  4. Call DxgkCbQueryServices; set ServicesType to DxgkServicesAgp, and set Interface to the address (cast as PINTERFACE) of your DXGK_AGP_INTERFACE structure.

  5. On return from DxgkCbQueryServices, your DXGK_AGP_INTERFACE structure will contain pointers to the AGP interface functions; for example, AgpAllocatePool.

Obtaining the Debug Report interface

To obtain a Debug Report interface, do the following:

  1. Allocate a DXGK_DEBUG_REPORT_INTERFACE structure.

  2. Set the Size member to sizeof(DXGK_DEBUG_REPORT_INTERFACE).

  3. Set the Version member. Version constants are defined in Dispmprt.h (for example, DXGK_DEBUG_REPORT_INTERFACE_VERSION_1).

  4. Call DxgkCbQueryServices; set ServicesType to DxgkServicesDebugReport, and set Interface to the address (cast as PINTERFACE) of your DXGK_DEBUG_REPORT_INTERFACE structure.

  5. On return from DxgkCbQueryServices, your DXGK_DEBUG_REPORT_INTERFACE structure will contain pointers to the Debug Report interface functions; for example, DbgReportCreate.

Obtaining the Timed Operation interface

To obtain a Timed Operation interface, do the following:

  1. Allocate a DXGK_TIMED_OPERATION_INTERFACE structure.

  2. Set the Size member to sizeof(DXGK_TIMED_OPERATION_INTERFACE).

  3. Set the Version member. Version constants are defined in Dispmprt.h (for example, DXGK_TIMED_OPERATION_INTERFACE_VERSION_1).

  4. Call DxgkCbQueryServices; set ServicesType to DxgkServicesTimedOperation, and set Interface to the address (cast as PINTERFACE) of your DXGK_TIMED_OPERATION_INTERFACE structure.

  5. On return from DxgkCbQueryServices, your DXGK_TIMED_OPERATION_INTERFACE structure will contain pointers to the Timed Operation interface functions; for example, TimedOperationStart.

Obtaining the SPB and System Firmware Table interfaces

The Simple Peripheral Bus (SPB) and System Firmware Table interfaces can be similarly obtained by following the above steps using the appropriate ServicesType and structure.

Requirements

Requirement Value
Minimum supported client Windows Vista
Target Platform Desktop
Header dispmprt.h (include Dispmprt.h)
IRQL PASSIVE_LEVEL

See also

DXGK_AGP_INTERFACE

DxgkDdiStartDevice

DXGK_DEBUG_REPORT_INTERFACE

DXGK_FIRMWARE_TABLE_INTERFACE

DXGK_SERVICES

DXGK_SPB_INTERFACE

DXGK_TIMED_OPERATION_INTERFACE

DXGKRNL_INTERFACE

INTERFACE