IDXGISwapChain1::GetRestrictToOutput method (dxgi1_2.h)

Gets the output (the display monitor) to which you can restrict the contents of a present operation.

Syntax

HRESULT GetRestrictToOutput(
  [out] IDXGIOutput **ppRestrictToOutput
);

Parameters

[out] ppRestrictToOutput

A pointer to a buffer that receives a pointer to the IDXGIOutput interface for the restrict-to output. An application passes this pointer to IDXGIOutput in a call to the IDXGIFactory2::CreateSwapChainForHwnd, IDXGIFactory2::CreateSwapChainForCoreWindow, or IDXGIFactory2::CreateSwapChainForComposition method to create the swap chain.

Return value

Returns S_OK if the restrict-to output was successfully retrieved; otherwise, returns E_INVALIDARG if the pointer is invalid.

Remarks

If the method succeeds, the runtime fills the buffer at ppRestrictToOutput with a pointer to the restrict-to output interface. This restrict-to output interface has its reference count incremented. When you are finished with it, be sure to release the interface to avoid a memory leak.

The output is also owned by the adapter on which the swap chain's device was created.

Requirements

Requirement Value
Minimum supported client Windows 8 and Platform Update for Windows 7 [desktop apps | UWP apps]
Minimum supported server Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | UWP apps]
Target Platform Windows
Header dxgi1_2.h
Library Dxgi.lib

See also

IDXGISwapChain1