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.

ID3D11Device5::CreateFence method

Creates a fence object.

This member function is equivalent to the Direct3D 12 ID3D12Device::CreateFence member function, and applies between Direct3D 11 and Direct3D 12 in interop scenarios.

Syntax


HRESULT CreateFence(
        UINT64           InitialValue,
        D3D11_FENCE_FLAG Flags,
        REFIID           riid,
  [out] void             **ppFence
);

Parameters

InitialValue

Type: UINT64

The initial value for the fence.

Flags

Type: D3D11_FENCE_FLAG

A combination of D3D11_FENCE_FLAG-typed values that are combined by using a bitwise OR operation. The resulting value specifies options for the fence.

riid

Type: REFIID

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

ppFence [out]

Type: void**

A pointer to a memory block that receives a pointer to the ID3D11Fence interface that is used to access the fence.

Return value

Type: HRESULT

Returns S_OK if successful; otherwise, returns one of the Direct3D 11 Return Codes.

Requirements

Header

D3d11_4.h

Library

D3d11.lib

See also

ID3D11Device5
UnregisterDeviceRemoved

 

 

Show:
© 2017 Microsoft