UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:mstask.IScheduledWorkItem.GetStatus |
IScheduledWorkItem::GetStatus (mstask.h) |
Retrieves the status of the work item. |
|
taskschd\ischeduledworkitem_getstatus.htm |
taskschd |
fb0bc52c-ae50-4c14-864d-099f2903adfb |
12/05/2018 |
GetStatus, GetStatus method [Task Scheduler], GetStatus method [Task Scheduler],IScheduledWorkItem interface, IScheduledWorkItem interface [Task Scheduler],GetStatus method, IScheduledWorkItem.GetStatus, IScheduledWorkItem::GetStatus, _msb_ischeduledworkitem_getstatus, mstask/IScheduledWorkItem::GetStatus, taskschd.ischeduledworkitem_getstatus |
mstask.h |
Windows |
Windows 2000 Professional [desktop apps only] |
Windows 2000 Server [desktop apps only] |
Mstask.lib |
Mstask.dll |
Windows |
Internet Explorer 4.0 or later on Windows NT 4.0 and Windows 95 |
19H1 |
|
|
|
|
|
|
[[This API may be altered or unavailable in subsequent versions of the operating system or product. Please use the Task Scheduler 2.0 Interfaces instead.] ]
Retrieves the status of the work item.
A pointer to an HRESULT value that contains one of the following values on return.
The work item is ready to run at its next scheduled time.
The work item is currently running.
One or more of the properties that are needed to run this task on a schedule have not been set.
The task has not been run. This value is returned whenever the task has not been run, even if the task is ready to be run at the next scheduled time or the task is a recurring task.
The task will not run at the scheduled times because it has been disabled.
There are no more runs scheduled for this task.
Either the task has no triggers or the existing triggers are disabled or not set.
The GetStatus method returns one of the following values.
Return code | Description |
---|---|
|
The operation was successful. The request was sent. For more information, see Remarks. |
|
The arguments are not valid. |
The methods of the IScheduledWorkItem interface are inherited by the ITask interface. Consequently, IScheduledWorkItem::GetStatus is typically called through the ITask interface.
IScheduledWorkItem::GetStatus does not obtain the status of the task dynamically. ITaskScheduler::Activate should be called to obtain a new IScheduledWorkItem interface, which is used to get an updated status. For more information, see the example for ITaskScheduler::Activate.
For an example of how to retrieve the status of a task, see C/C++ Code Example: Retrieving Task Status.
For an example of how to retrieve the task status as part of terminating the task, see Terminating a Task Example.