DxgkCbQueryServices routine

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,
  _Inout_ PINTERFACE    Interface
)
{ ... }

Parameters

DeviceHandle [in]

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.

ServicesType [in]

A constant from the DXGK_SERVICES enumeration that specifies which interface is being requested. This parameter must be set to DxgkServicesAgp, DxgkServicesDebugReport, or DxgkServicesTimedOperation, as those are the only supported interfaces.

Interface [in, out]

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.

To obtain an 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 interface functions: AgpAllocatePool and the like.

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 interface functions: DbgReportCreate and the like.

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 interface functions: TimedOperationStart and the like.

Requirements

Target platform

Version

Available in Windows Vista and later versions of the Windows operating systems.

Header

Dispmprt.h (include Dispmprt.h)

IRQL

PASSIVE_LEVEL

See also

INTERFACE
AGP Interface
Debug Report Interface
Timed Operation Interface

 

 

Send comments about this topic to Microsoft

Show: