ITaskService::GetRunningTasks method (taskschd.h)
Gets a collection of running tasks.
HRESULT GetRunningTasks( [in] LONG flags, [out] IRunningTaskCollection **ppRunningTasks );
A value from the TASK_ENUM_FLAGS enumeration. Pass in 0 to return a collection of running tasks that are not hidden tasks.
An IRunningTaskCollection interface that contains the currently running tasks.
Pass in a reference to a NULL IRunningTaskCollection interface pointer. Referencing a non-NULL pointer can cause a memory leak because the pointer will be overwritten.
This method can return one of these values.
||An invalid argument was specified in the method call. Passing a nonzero value to the flags parameter will return E_INVALIDARG.|
||The operation completed successfully.|
||NULL was passed into the retVal parameter.|
||The user has not connected to the service.|
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2008 [desktop apps only]|