IRunningTask::Stop method (taskschd.h)

Stops this instance of the task.

Syntax

HRESULT Stop();

Return value

This method can return one of these values.

Return code Description
S_OK
The task was stopped.
E_ACCESSDENIED
The user does not have permission to stop the task, the task is disabled, or the task is not allowed to be run on demand.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header taskschd.h
Library Taskschd.lib
DLL Taskschd.dll

See also

IRunningTask

Task Scheduler