Creates a desktop duplication interface from the IDXGIOutput1 interface that represents an adapter output.
public:
HRESULT DuplicateOutput(
IUnknown *pDevice,
IDXGIOutputDuplication **ppOutputDuplication
)
pDevice
Type: IUnknown *
[in] A pointer to the Direct3D device interface that you can use to process the desktop image. This device must be created from the adapter to which the output is connected.
ppOutputDuplication
Type: IDXGIOutputDuplication **
[out] A pointer to a variable that receives the new IDXGIOutputDuplication interface.
Type: HRESULT
If an application wants to duplicate the entire desktop, it must create a desktop duplication interface on each active output on the desktop. This interface does not provide an explicit way to synchronize the timing of each output image. Instead, the application must use the time stamp of each output, and then determine how to combine the images.
For DuplicateOutput to succeed, you must create pDevice from IDXGIFactory1 or a later version of a DXGI factory interface that inherits from IDXGIFactory1.
If the current mode is a stereo mode, the desktop duplication interface provides the image for the left stereo image only.
By default, only four processes can use a IDXGIOutputDuplication interface at the same time within a single session. A process can have only one desktop duplication interface on a single desktop output; however, that process can have a desktop duplication interface for each output that is part of the desktop.
If DuplicateOutput fails with DXGI_ERROR_UNSUPPORTED, the application can wait for system notification of desktop switches and mode changes and then call DuplicateOutput again after such a notification occurs. For more information, see information in desktop switch (EVENT_SYSTEM_DESKTOPSWITCH) and mode change notification (WM_DISPLAYCHANGE).
Header: Declared in dxgi1_2.h.
Library: Use dxgi.lib.