[[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 work item run times for a specified time period.
HRESULT GetRunTimes( const LPSYSTEMTIME pstBegin, const LPSYSTEMTIME pstEnd, WORD *pCount, LPSYSTEMTIME *rgstTaskTimes );
A pointer to a SYSTEMTIME structure that contains the starting time of the time period to check. This value is inclusive.
A pointer to a SYSTEMTIME structure that contains the ending time of the time period to check. This value is exclusive. If NULL is passed for this value, the end time is infinite.
A pointer to a WORD value that specifies the number of run times to retrieve.
On input, this parameter contains the number of run times being requested. This can be a number of between 1 and TASK_MAX_RUN_TIMES.
On output, this parameter contains the number of run times retrieved.
A pointer to an array of SYSTEMTIME structures. A NULL LPSYSTEMTIME object should be passed into this parameter. On return, this array contains pCount run times. You must free this array by a calling the CoTaskMemFree function.
The GetRunTimes method returns one of the following values.
||The requested number of run times was retrieved.|
||The method succeeded, but fewer than the requested number of run times were retrieved. The number of run times retrieved is contained in the value pointed to by pCount. If the number of run times retrieved is zero, there are also no event-based triggers that can cause the work item to be executed during the specified time period.|
||The work item is enabled but has no valid triggers.|
||The work item is disabled.|
||One or more of the arguments are invalid.|
||There is insufficient memory to compute the result.|
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|
|Redistributable||Internet Explorer 4.0 or later on Windows NT 4.0 and Windows 95|