IDXGIFactory4::EnumAdapterByLuid method (dxgi1_4.h)

Outputs the IDXGIAdapter for the specified LUID.

Syntax

HRESULT EnumAdapterByLuid(
  [in]  LUID   AdapterLuid,
  [in]  REFIID riid,
  [out] void   **ppvAdapter
);

Parameters

[in] AdapterLuid

Type: LUID

A unique value that identifies the adapter. See LUID for a definition of the structure. LUID is defined in dxgi.h.

[in] riid

Type: REFIID

The globally unique identifier (GUID) of the IDXGIAdapter object referenced by the ppvAdapter parameter.

[out] ppvAdapter

Type: void**

The address of an IDXGIAdapter interface pointer to the adapter. This parameter must not be NULL.

Return value

Type: HRESULT

Returns S_OK if successful; an error code otherwise. For a list of error codes, see DXGI_ERROR. See also Direct3D 12 Return Codes.

Remarks

For Direct3D 12, it's no longer possible to backtrack from a device to the IDXGIAdapter that was used to create it. IDXGIFactory4::EnumAdapterByLuid enables an app to retrieve information about the adapter where a D3D12 device was created. IDXGIFactory4::EnumAdapterByLuid is designed to be paired with ID3D12Device::GetAdapterLuid. For more information, see DXGI 1.4 Improvements.

Requirements

Requirement Value
Target Platform Windows
Header dxgi1_4.h
Library Dxgi.lib

See also

DXGI Interfaces

IDXGIFactory4