Bewerken

Delen via


PFND3DDDI_QUERYADAPTERINFOCB callback function (d3dumddi.h)

The pfnQueryAdapterInfoCb function retrieves graphics adapter information.

Syntax

PFND3DDDI_QUERYADAPTERINFOCB Pfnd3dddiQueryadapterinfocb;

HRESULT Pfnd3dddiQueryadapterinfocb(
  HANDLE hAdapter,
  const D3DDDICB_QUERYADAPTERINFO *unnamedParam2
)
{...}

Parameters

hAdapter

A handle to the graphics adapter object.

unnamedParam2

pData [in, out]

A pointer to a D3DDDICB_QUERYADAPTERINFO structure that receives information about the graphics hardware.

Return value

pfnQueryAdapterInfoCb returns one of the following values:

Return code Description
S_OK Information was successfully retrieved.
E_INVALIDARG Parameters were validated and determined to be incorrect.

This function might also return other HRESULT values.

Remarks

Before the Microsoft Direct3D runtime calls the user-mode display driver's CreateDevice or CreateDevice(D3D10) function to create the graphics context, the user-mode display driver should call pfnQueryAdapterInfoCb to retrieve information about the graphics hardware. This order is especially important for a multiple-monitor system.

In the pfnQueryAdapterInfoCb call, the user-mode display driver sends a buffer that the display miniport driver fills with configuration data. After receiving this configuration data, the user-mode display driver can accurately report its capabilities when the runtime calls the user-mode display driver's GetCaps and GetCaps(D3D10_2) functions. When the runtime subsequently calls other user-mode display driver functions that are specified in the D3DDDI_DEVICEFUNCS, D3D10DDI_DEVICEFUNCS, or D3D11DDI_DEVICEFUNCS structure, the user-mode display driver can generate command streams that the hardware can process.

Examples

The following code example shows how to retrieve graphics adapter information.

    HRESULT hr;
    // Query for GART segment support
    D3DDDICB_QUERYADAPTERINFO   ddiQueryAdapterInfo;

    memset(&R200AdapterInfo, 0, sizeof(R200AdapterInfo));

    ddiQueryAdapterInfo.pPrivateDriverData = &R200AdapterInfo;
    ddiQueryAdapterInfo.PrivateDriverDataSize = sizeof(R200AdapterInfo);

    hr = m_Callbacks.pfnQueryAdapterInfoCb(m_hAdapter, &ddiQueryAdapterInfo);
    if (FAILED(hr)) {
        return FALSE;
    }

    m_ulGartSupported = R200AdapterInfo.ulGartSupported;

Requirements

Requirement Value
Minimum supported client Available in Windows Vista and later versions of the Windows operating systems.
Target Platform Desktop
Header d3dumddi.h (include D3dumddi.h)

See also

CreateDevice

CreateDevice(D3D10)

D3D10DDI_DEVICEFUNCS

D3D11DDI_DEVICEFUNCS

D3DDDICB_QUERYADAPTERINFO

D3DDDI_ADAPTERCALLBACKS

D3DDDI_DEVICEFUNCS

GetCaps