GetADLXDesktopFromADLIds

Gets the reference counted IADLXDesktop interface corresponding to the desktop with the specified ADL adapter index, VidPnSource ID, the PCI bus number, device number, and function number.

Syntax

Copied!

ADLX_RESULT     GetADLXDesktopFromADLIds (adlx_int adapterIndex, adlx_int VidPnSource, adlx_int bus, adlx_int device, adlx_int function, IADLXDesktop ** ppDesktop)

Parameters

  1. [in] adapterIndex adlx_int The ADL adapter index of the GPU where the requested desktop is instantiated.

  2. [in] VidPnSourceID adlx_int The zero-based identification number of the video present source in a path of a video present network (VidPN) topology of the requested desktop.

  3. [in] bus adlx_int The unique PCIE bus number of the GPU where the requested desktop is instantiated.

  4. [in] device adlx_int The device number of the GPU where the requested desktop is instantiated.

  5. [in] function adlx_int The function number of the GPU where the requested desktop is instantiated.

  6. [out] ppDesktop IADLXDesktop ** The address of the pointer to the returned interface. If the desktop was not found, the method sets the dereferenced address *ppDesktop to nullptr.

Return Value

If the IADLXDesktop interface is successfully returned, ADLX_OK is returned.

If the arguments are incorrect ADLX_INVALID_ARGS s returned.

If IADLXDesktop interface is not returned, an error code is returned.

Refer to ADLX_RESULT for success codes and error codes.

Remarks

GetADLXDesktopFromADLIds is used when and ADLX method must be called from a desktop obtained from ADL. The adapter index corresponds to the GPU where the desktop is instantiated.

The PCI bus number, device number, and function number parameters correspond to ADL AdapterInfo.iBusNumber, AdapterInfo.iDeviceNumber, and AdapterInfo.iFunctionNumber of the GPU where that desktop is instantiated.

The VidPnSource ID is obtained from D3DKMT_OPENADAPTERFROMGDIDISPLAYNAME.VidPnSourceId field for this desktop.

The returned interface must be discarded with Release when it is no longer needed.

Additional Info

In C++ when using a smart pointer for the returned interface there is no need to call Release because the smart pointer calls it internally.

Requirements

Header

include “ADLXDefines.h”

Minimum version

1.0