次の方法で共有


Engine::CancelAssessment method

Requests that the specified assessment stop running.

Syntax

virtual HRESULT CancelAssessment(
   INT assessmentIndex
) = 0;

Parameters

assessmentIndex

The index of the assessment to cancel. The assessment can only be cancelled when it is running. An assessment s index is its position in the AssessmentRuns section of the job manifest..

Return value

If successful, the method returns a value of S_OK.

If asmtIndex parameter does not match the index of the currently running assessment, the method returns AXE_E_INVALID_INDEX.

If AXE is not currently running a job, the method returns AXE_E_NO_JOB_RUNNING. The specified assessment must be running to be cancelled.

Remarks

It is up to the assessment to support cancellation. If the assessment does not support cancellation, it will eventually exit on its own. If the solution wants to terminate the job if the assessment does not support cancellation, it is up to the solution to maintain its own timer and decide when to give up waiting for an assessment to cancel on its own.

Managed code uses Engine.CancelAssessment | cancelAssessment method.

Requirements

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

See also

Engine

CancelJob

TerminateJob

GetCancelEvent

IsCanceled