Share via


Support::GetCancelEvent method

Retrieves the handle to an event that Axe signals when a solution requests the assessment should stop running.

Syntax

virtual HRESULT GetCancelEvent(
  [out] HANDLE *cancelEventHandle
) const = 0;

Parameters

cancelEventHandle [out]

A pointer to the handle for the cancel event object.

Return value

If the function succeeds, it returns S_OK. If it fails, it returns an error value.

Remarks

This method enables an assessment to get access to the event object when a solution requests the assessment stop running. The assessment should immediately respond by calling ReportProgress with a ProgressType value of ProgressTypeCancelling to acknowledge receipt of the cancellation request. Otherwise, the engine will inform the solution application that the assessment was not cancelled. After acknowledging that the assessment has received the notification to cancel, the assessment should immediately begin cleaning up and ending its operation.

Using the wait handle to be notified asynchronously when the assessment is being aborted is the preferred method for detecting a cancellation request.

Managed code uses Support.CancelEvent property.

Requirements

Minimum supported client
Windows 7 [desktop apps only]
Minimum supported server
Windows Server 2008 R2 [desktop apps only]
Header
AxeRuntime.h
DLL
AxeCore.dll

See also

Support

ReportProgress

ProgressType

IsCanceled