D3DKMTEnumAdapters2 function

Supplies information for enumerating all graphics and display adapters on the system.

Syntax

NTSTATUS D3DKMTEnumAdapters2(
  const D3DKMT_ENUMADAPTERS2 *Arg1
);

Parameters

Arg1

_Inout_ D3DKMT_ENUMADAPTERS2 * Arg1

Caller passes in array size and empty array space. Callee verifies enough room in the array, fills out array, and passes back how much of the array was used.

Return Value

This function returns NTSTATUS.

Return Code Description
STATUS_BUFFER_TOO_SMALL When the provided array is too small to receive all the adapters.
STATUS_INVALID_PARAMETER When pEnumAdapters is null or is otherwise an invalid memory region.
STATUS_NO_MEMORY When memory cannot be allocated to satisfy the operation.

Remarks

When D3DKMT_ENUMADAPTERS2::pAdapters is null, D3DKMT_ENUMADAPTERS2::NumAdapters is set to the maximum supported adapter count. Callees will commonly invoke the method, first, to retrieve the maximum supported adapter count.

When the callee successfully enumerates adapters, it becomes responsible for explicitly managing the lifespan of adapter D3DKMT_HANDLEs. These handles are returned to the callee through pEnumAdapters, and they must be closed with D3DKMTCloseAdapter.

Requirements

   
Minimum supported client Windows 8
Minimum supported server Windows Server 2012
Target Platform Windows
Header d3dkmthk.h (include D3dkmthk.h)
Library Gdi32.lib
DLL Gdi32.dll

See Also