展开 最小化

D3DKMTQueryAdapterInfo function

The D3DKMTQueryAdapterInfo function retrieves graphics adapter information.

Syntax


NTSTATUS APIENTRY D3DKMTQueryAdapterInfo(
  _Inout_  const D3DKMT_QUERYADAPTERINFO *pData
);

Parameters

pData [in, out]

A pointer to a D3DKMT_QUERYADAPTERINFO structure that is filled with specified information about the graphics hardware.

Return value

D3DKMTQueryAdapterInfo returns one of the following values:

Return codeDescription
STATUS_SUCCESS

Graphics adapter information was successfully retrieved.

STATUS_DEVICE_REMOVED

The graphics adapter was stopped.

STATUS_INVALID_PARAMETER

Parameters were validated and determined to be incorrect.

STATUS_NO_MEMORY

D3DKMTQueryAdapterInfo could not complete because of insufficient memory.

 

This function might also return other NTSTATUS values.

Examples

The following code example demonstrates how an OpenGL ICD can use D3DKMTQueryAdapterInfo to retrieve the name of the OpenGL ICD.


HRESULT GetUserModeDriverName(HANDLE hAdapter, D3DKMT_UMDFILENAMEINFO* pUmdInfo, KMTUMDVERSION UmdVersion)
{
    D3DKMT_QUERYADAPTERINFO QueryAdapterInfo;

    QueryAdapterInfo.hAdapter = hAdapter;
    QueryAdapterInfo.Type = KMTQAITYPE_UMDRIVERNAME;

    pUmdInfo->Version = UmdVersion
    QueryAdapterInfo.pPrivateDriverData = (VOID*)pUmdInfo;
    QueryAdapterInfo.PrivateDriverDataSize = sizeof(*pUmdInfo);

    if (NT_SUCCESS((*pfnKTQueryAdapterInfo)(&QueryAdapterInfo)))
    {
        return S_OK;
    }
    return E_FAIL;
}

Requirements

Version

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

Header

D3dkmthk.h (include D3dkmthk.h)

Library

Gdi32.lib

See also

D3DKMT_QUERYADAPTERINFO
D3DKMTSetQueuedLimit

 

 

Send comments about this topic to Microsoft

显示:
© 2014 Microsoft