Share via


DisplayTaskPool.TryExecuteTask(DisplayTask) Method

Definition

Queues a DisplayTask for execution on the device. Tasks are executed asynchronously, so this method returns immediately. TryExecuteTask provides a DisplayTaskResult object, which affords you multiple pieces of feedback/info regarding the state of the presentation request.

public:
 virtual DisplayTaskResult ^ TryExecuteTask(DisplayTask ^ task) = TryExecuteTask;
DisplayTaskResult TryExecuteTask(DisplayTask const& task);
public DisplayTaskResult TryExecuteTask(DisplayTask task);
function tryExecuteTask(task)
Public Function TryExecuteTask (task As DisplayTask) As DisplayTaskResult

Parameters

task
DisplayTask

The DisplayTask to queue.

Returns

A DisplayTaskResult object, providing simple actionable feedback about what happened, and what you should do about it.

Windows requirements

Device family
Windows 11 (introduced in 10.0.22000.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v14.0)

Applies to