ITaskScheduler::NewWorkItemITaskScheduler::NewWorkItem*
*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.

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

Back to top


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.