pfnQueryAdapterInfoCb routine

The pfnQueryAdapterInfoCb function retrieves graphics adapter information.

Syntax


PFND3DDDI_QUERYADAPTERINFOCB pfnQueryAdapterInfoCb;

__checkReturn HRESULT APIENTRY CALLBACK pfnQueryAdapterInfoCb(
  _In_     HANDLE hAdapter,
  _Inout_  const D3DDDICB_QUERYADAPTERINFO *pData
)
{ ... }

Parameters

hAdapter [in]

A handle to the graphics adapter object.

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 codeDescription
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

Version

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

Header

D3dumddi.h (include D3dumddi.h)

See also

CreateDevice
CreateDevice(D3D10)
D3DDDI_ADAPTERCALLBACKS
D3DDDICB_QUERYADAPTERINFO
D3D10DDI_DEVICEFUNCS
D3D11DDI_DEVICEFUNCS
D3DDDI_DEVICEFUNCS
GetCaps

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft