Contents Index Topic Contents | ||
Previous Topic: ITaskScheduler::Activate Next Topic: ITaskScheduler::Delete |
ITaskScheduler::AddWorkItem
HRESULT AddWorkItem( LPCWSTR pwszTaskName, IScheduledWorkItem * pWorkItem );Adds a task to the schedule of tasks. Unlike NewWorkItem, this method requires that you first create an object that supports the IScheduledWorkItem interface and pass its address in the pWorkItem parameter.
- Returns one of the following values:
S_OK The operation was successful. ERROR_FILE_EXISTS A task with the specified name already exists. E_INVALIDARG One or more of the arguments are not valid. E_OUTOFMEMORY Not enough memory is available to complete the operation.
- pwszTaskName
- LPCWSTR that specifies the name of the task to add. The task name must conform to Windows NT file-naming conventions but cannot include backslashes, because nesting within the task folder object is not allowed.
- pWorkItem
- Address of an interface pointer that receives the requested interface.
See also ITaskScheduler::NewWorkItem
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.