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.
Returns all instances of the currently running registered task.
Syntax
HRESULT GetInstances(
LONG flags,
[out] IRunningTaskCollection **ppRunningTasks
);
Parameters
flags
This parameter is reserved for future use and must be set to 0.
[out] ppRunningTasks
An IRunningTaskCollection interface that contains all currently running instances of the task under the user's context.
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.
Return code | Description |
---|---|
|
The operation completed successfully. |
|
A non-null flag was passed into the flags parameter. |
|
NULL was passed into the ppRunningTasks parameter. |
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 |