Skip to main content
Retrieves the fence for the protected session. From the fence, you can retrieve the current uniqueness validity value (using ID3D12Fence::GetCompletedValue), and add monitors for changes to its value. This is a read-only fence.

Syntax

Parameters

riid
Type: const IID &
The GUID of the interface to a fence. Most commonly, ID3D12Fence, although it may be any GUID for any interface. If the protected session object doesn’t support the interface for this GUID, the function returns E_NOINTERFACE. ppFence [optional]
Type: void **
A pointer to a memory block that receives a pointer to the fence for the given protected session.

Return value

Type: HRESULT If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

Header: d3d12_xs.h or d3d12_x.h
Library: d3d12_xs.lib or d3d12_x.lib
Supported Platforms: XBOX Series consoles and XBOX One family

See Also

ID3D12ProtectedSession
Last modified on August 5, 2026