DisplayTaskResult.PresentId Property

Definition

Gets a value representing the number of presents that have been requested on a given DisplayTaskPool.

public:
 property unsigned long long PresentId { unsigned long long get(); };
uint64_t PresentId();
public ulong PresentId { get; }
var uInt64 = displayTaskResult.presentId;
Public ReadOnly Property PresentId As ULong

Property Value

UInt64

unsigned long long

uint64_t

A UINT64 type identifier representing the number of presents that have been requested on a given DisplayTaskPool.

Remarks

The value returned increments monotonically by 1 on every call to DisplayTaskPool.TryExecuteTask for a given DisplayTaskPool, irrespective of whether the TryExecuteTask returned DisplayPresentStatus.Succeeded in DisplayTaskResult.PresentStatus.

The only scenario where PresentId won't be incremented is where you call TryExecuteTask with invalid parameters, and DirectDisplay runtime validation fails before it calls into the kernel. In those cases, TryExecuteTask will fail right away, and return an HRESULT. For a new DisplayTaskPool object, PresentId will be reset to 0, and the very first TryExecuteTask will return a PresentId equal to 1.

One of the common usages of PresentId is that you can use it to put a wait on a fence used as an input to DisplayTask.SetSignal.

Applies to

See also