(0) exportieren Drucken
Alle erweitern
EN
Dieser Inhalt ist in Ihrer Sprache leider nicht verfügbar. Im Folgenden finden Sie die englische Version.

IDXGIAdapter::EnumOutputs method

Enumerate adapter (video card) outputs.

Syntax


HRESULT EnumOutputs(
  [in]       UINT Output,
  [in, out]  IDXGIOutput **ppOutput
);

Parameters

Output [in]

Type: UINT

The index of the output.

ppOutput [in, out]

Type: IDXGIOutput**

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.

Windows Phone 8: This API is supported.

Examples

Enumerating Outputs

Here is an example of how to use EnumOutputs to enumerate all the outputs on an adapter:



UINT i = 0;
IDXGIOutput * pOutput;
std::vector<IDXGIOutput*> vOutputs;
while(pAdapter->EnumOutputs(i, &pOutput) != DXGI_ERROR_NOT_FOUND)
{
    vOutputs.push_back(pOutput);
    ++i;
}


Requirements

Header

DXGI.h

Library

DXGI.lib

See also

IDXGIAdapter
DXGI Interfaces

 

 

Community-Beiträge

HINZUFÜGEN
Anzeigen:
© 2014 Microsoft