Contents Index Topic Contents | ||
Previous Topic: IScheduledWorkItem::GetNextRunTime Next Topic: IScheduledWorkItem::GetStatus |
IScheduledWorkItem::GetRunTimes
HRESULT GetRunTimes( const LPSYSTEMTIME pstBegin, const LPSYSTEMTIME pstEnd, WORD * pCount, LPSYSTEMTIME * rgstTaskTimes );Retrieves the work item run times for a specified time period.
- Returns one of the following values:
S_OK The requested number of run times was retrieved. S_FALSE The method succeeded, but fewer than the requested number of run times was 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. SCHED_S_EVENT_TRIGGER No run times exist for the specified time period, but event-based triggers exist that might cause the work item to run during the specified time period. SCHED_S_TASK_NO_VALID_TRIGGERS The work item is enabled but has no valid triggers. SCHED_S_TASK_DISABLED The work item is disabled. E_INVALIDARG One or more of the arguments are invalid. E_OUTOFMEMORY There is insufficient memory to compute the result.
- pstBegin
- Address of a SYSTEMTIME structure that contains the starting time of the time period to check. This value is inclusive.
- pstEnd
- Address of 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.
- pCount
- Address of a value that specifies the number of run times to retrieve. Before calling GetRunTimes, this value contains the number of run times being requested. This can be a number between 1 and TASK_MAX_RUN_TIMES. After GetRunTimes is called, this value contains the number of run times actually retrieved.
- rgstTaskTimes
- Address of an array of SYSTEMTIME structures. This array contains pCount run times. This array must be freed using the CoTaskMemFree function.
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.