PFND3DKMT_ENUMADAPTERS3 callback function (d3dkmthk.h)
The PFND3DKMT_ENUMADAPTERS3 callback function enumerates graphics and display adapters on the system.
Syntax
PFND3DKMT_ENUMADAPTERS3 Pfnd3dkmtEnumadapters3;
NTSTATUS Pfnd3dkmtEnumadapters3(
[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 must be closed with D3DKMTCloseAdapter.
Setting none of the D3DKMT_ENUMADAPTERS3::Filter flags will still enumerate adapters, but there are fewer adapters than PFND3DKMT_ENUMADAPTERS2 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 |
Header | d3dkmthk.h |