Contents Index Topic Contents | ||
Previous Topic: ITask::SetApplicationName Next Topic: ITask::SetParameters |
ITask::SetMaxRunTime
HRESULT SetMaxRunTime( DWORD dwMaxRunTime );Sets the maximum time the task can run before terminating.
- Returns one of the following values:
S_OK The operation was successful. E_INVALIDARG The arguments are not valid. E_OUTOFMEMORY Not enough memory is available.
- dwMaxRunTime
- Value assigned as the maximum run time, in milliseconds, for the current task.
If the maximum run time is reached during the execution of a task, the Scheduling Agent first sends a WM_CLOSE message to the associated application. If the application has not exited within three minutes, TerminateProcess is run.
See also ITask::GetMaxRunTime
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.