IDXGIAdapter::EnumOutputs method (dxgi.h)
Enumerate adapter (video card) outputs.
Syntax
HRESULT EnumOutputs(
UINT Output,
[out] IDXGIOutput **ppOutput
);
Parameters
Output
Type: UINT
The index of the output.
[out] ppOutput
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). DXGI_ERROR_NOT_FOUND is returned if the index is greater than the number of outputs.
If the adapter came from a device created using D3D_DRIVER_TYPE_WARP, then the adapter has no outputs, so DXGI_ERROR_NOT_FOUND is returned.
Remarks
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.
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
Requirement | Value |
---|---|
Target Platform | Windows |
Header | dxgi.h |
Library | DXGI.lib |