Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Gets a collection of running tasks.
Syntax
HRESULT GetRunningTasks(
[in] LONG flags,
[out] IRunningTaskCollection **ppRunningTasks
);
Parameters
[in] flags
A value from the TASK_ENUM_FLAGS enumeration. Pass in 0 to return a collection of running tasks that are not hidden tasks.
[out] ppRunningTasks
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.
Return value
This method can return one of these values.
Description | |
---|---|
|
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. |
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 |