PFND3DKMT_ENUMADAPTERS2 callback function

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

Syntax

PFND3DKMT_ENUMADAPTERS2 Pfnd3dkmtEnumadapters2;

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

Parameters

Arg1

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

   
Header d3dkmthk.h

See Also