IDXGIAdapter::EnumOutputs Method

Enumerate adapter (video card) outputs.

Syntax

public:
HRESULT EnumOutputs(
         UINT Output,
         IDXGIOutput **ppOutput
)  

Parameters

Output
Type: UINT 

The index of the output.

ppOutput
Type: IDXGIOutput **

[out] The address of a pointer to an IDXGIOutput interface at the position specified by the Output parameter.

Return value

Type: HRESULT 

A code that indicates success or failure (see DXGI_ERROR). Will return DXGI_ERROR_NOT_FOUND if the index is greater than the number of outputs.

Remarks

Note

If you call this API in a Session 0 process, it returns DXGI_ERROR_NOT_CURRENTLY_AVAILABLE.

When the EnumOutputs method succeeds and fills the ppOutput parameter with the address of the pointer to the output interface, EnumOutputs increments the output interface’s reference count. To avoid a memory leak, when you finish using the output interface, call the Release method to decrement the reference count.

EnumOutputs first returns the output on which the desktop primary is displayed. This output corresponds with an index of zero. EnumOutputs then returns other outputs.

Requirements

Header: Declared in d3d11_x.h (dxgi.h on other Windows platforms).

Library: Use d3d11_x.lib (dxgi.lib on other Windows platforms).

See also

IDXGIAdapter

IDXGIAdapter Members