ID3D11Device5::OpenSharedFence method (d3d11_4.h)

Opens a handle for a shared fence by using HANDLE and REFIID.

This member function is a limited version of the Direct3D 12 ID3D12Device::OpenSharedHandle member function, and applies between Direct3D 11 and Direct3D 12 in interop scenarios. Unlike ID3D12Device::OpenSharedHandle which operates on resources, heaps, and fences, the ID3D11Device5::OpenSharedFence function only operates on fences; in Direct3D 11, shared resources are opened with the ID3D11Device::OpenSharedResource1 member function.

Syntax

HRESULT OpenSharedFence(
  [in]            HANDLE hFence,
                  REFIID ReturnedInterface,
  [out, optional] void   **ppFence
);

Parameters

[in] hFence

Type: HANDLE

The handle that was returned by a call to ID3D11Fence::CreateSharedHandle or ID3D12Device::CreateSharedHandle.

ReturnedInterface

Type: REFIID

The globally unique identifier (GUID) for the ID3D11Fence interface. The REFIID, or GUID, of the interface can be obtained by using the __uuidof() macro. For example, __uuidof(ID3D11Fence) will get the GUID of the interface to the fence.

[out, optional] ppFence

Type: void**

A pointer to a memory block that receives a pointer to the ID3D11Fence interface.

Return value

Type: HRESULT

This method returns one of the Direct3D 11 Return Codes.

Requirements

Requirement Value
Target Platform Windows
Header d3d11_4.h
Library D3d11.lib

See also

ID3D11Device5, Multi-adapter systems