Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IDXGIFactoryMedia::CreateSwapChainForCompositionSurfaceHandle method

Creates a YUV swap chain for an existing DirectComposition surface handle.

Syntax


HRESULT CreateSwapChainForCompositionSurfaceHandle(
  [in]                 IUnknown              *pDevice,
  [in, optional]       HANDLE                hSurface,
  [in]           const DXGI_SWAP_CHAIN_DESC1 *pDesc,
  [in, optional]       IDXGIOutput           *pRestrictToOutput,
  [out]                IDXGISwapChain1       **ppSwapChain
);

Parameters

pDevice [in]

A pointer to the Direct3D device for the swap chain. This parameter cannot be NULL. Software drivers, like D3D_DRIVER_TYPE_REFERENCE, are not supported for composition swap chains.

hSurface [in, optional]

A handle to an existing DirectComposition surface. This parameter cannot be NULL.

pDesc [in]

A pointer to a DXGI_SWAP_CHAIN_DESC1 structure for the swap-chain description. This parameter cannot be NULL.

pRestrictToOutput [in, optional]

A pointer to the IDXGIOutput interface for the swap chain to restrict content to. If the swap chain is moved to a different output, the content is black. You can optionally set this parameter to an output target that uses DXGI_PRESENT_RESTRICT_TO_OUTPUT to restrict the content on this output. If the swap chain is moved to a different output, the content is black.

You must also pass the DXGI_PRESENT_RESTRICT_TO_OUTPUT flag in a present call to force the content to appear blacked out on any other output. If you want to restrict the content to a different output, you must create a new swap chain. However, you can conditionally restrict content based on the DXGI_PRESENT_RESTRICT_TO_OUTPUT flag.

Set this parameter to NULL if you don't want to restrict content to an output target.

ppSwapChain [out]

A pointer to a variable that receives a pointer to the IDXGISwapChain1 interface for the swap chain that this method creates.

Return value

CreateSwapChainForCompositionSurfaceHandle returns:

  • S_OK if it successfully created a swap chain.
  • E_OUTOFMEMORY if memory is unavailable to complete the operation.
  • DXGI_ERROR_INVALID_CALL if the calling application provided invalid data, for example, if pDesc, pYuvDecodeBuffers, or ppSwapChain is NULL.
  • Possibly other error codes that are described in the DXGI_ERROR topic that are defined by the type of device that you pass to pDevice.

Requirements

Minimum supported client

Windows 8.1 [desktop apps only]

Minimum supported server

Windows Server 2012 R2 [desktop apps only]

Header

Dxgi1_3.h

Library

Dxgi.lib

See also

IDXGIFactoryMedia

 

 

Show:
© 2017 Microsoft