PFND3DKMT_ENUMADAPTERS2 callback function (d3dkmthk.h)

The PFND3DKMT_ENUMADAPTERS2 callback function enumerates all graphics and display adapters on the system.

Syntax

PFND3DKMT_ENUMADAPTERS2 Pfnd3dkmtEnumadapters2;

NTSTATUS Pfnd3dkmtEnumadapters2(
  const D3DKMT_ENUMADAPTERS2 *unnamedParam1
)
{...}

Parameters

unnamedParam1

_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 must be closed with D3DKMTCloseAdapter.

Requirements

Requirement Value
Header d3dkmthk.h

See also