D3DKMTEnumAdapters3 function (d3dkmthk.h)
Supplies information for enumerating graphics and display adapters on the system.
Syntax
NTSTATUS D3DKMTEnumAdapters3(
[in/out] D3DKMT_ENUMADAPTERS3 *unnamedParam1
);
Parameters
[in/out] unnamedParam1
A D3DKMT_ENUMADAPTERS3 structure. The caller passes in the array size and an empty array space. The callee verifies that there is enough room in the array, fills out the array, and passes back how much of the array was used.
Return value
This function returns NTSTATUS.
Return Code | Description |
---|---|
STATUS_BUFFER_TOO_SMALL | The provided array is too small to receive all the adapters. |
STATUS_INVALID_PARAMETER | The pEnumAdapters member is null or is otherwise an invalid memory region. |
STATUS_NO_MEMORY | Memory cannot be allocated to satisfy the operation. |
Remarks
When D3DKMT_ENUMADAPTERS3::pAdapters is null, D3DKMT_ENUMADAPTERS3::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.
Setting none of the D3DKMT_ENUMADAPTERS3::Filter flags will still enumerate adapters, but there are fewer adapters than D3DKMTEnumAdapters2 enumerates. ComputeOnly adapters are left out of the default enumeration, to avoid breaking applications. DisplayOnly adapters are also left out of the default enumeration.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 10, version 2004 |
Target Platform | Windows |
Header | d3dkmthk.h (include D3dkmthk.h) |
Library | onecoreuap.lib |
DLL | Gdi32.dll |