Contents Index Topic Contents | ||
Previous Topic: ITaskScheduler::IsOfType Next Topic: ITaskScheduler::SetTargetComputer |
ITaskScheduler::NewWorkItem
HRESULT NewWorkItem( LPCWSTR pwszTaskName, REFCLSID rclsid, REFIID riid, IUnknown ** ppunk );Allocates space for a new task and retrieves its address. Unlike AddWorkItem, this function handles memory allocation automatically.
- 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 new task's name. 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.
- rclsid
- Identifier of the class of work item to be created. The only supported class is CLSID_Ctask.
- riid
- Reference identifier of the interface being requested.
- ppunk
- Address of an interface pointer that receives the requested interface.
See also ITaskScheduler::AddWorkItem
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.