IScheduledWorkItem::GetWorkItemData method

[[This API may be altered or unavailable in subsequent versions of the operating system or product. Please use the Task Scheduler 2.0 Interfaces instead.] ]

Retrieves application-defined data associated with the work item.

Syntax

HRESULT GetWorkItemData(
  WORD *pcbData,
  BYTE **prgbData
);

Parameters

pcbData

A pointer to the number of bytes copied.

prgbData

A pointer to a pointer to a BYTE that contains user-defined data for the current work item. The method that invokes GetWorkItemData is responsible for freeing this memory by using CoTaskMemFree.

Return Value

The GetWorkItemData method returns one of the following values.

Return code Description
S_OK
The operation was successful.
E_INVALIDARG
The arguments are not valid.
E_OUTOFMEMORY
Not enough memory is available.

Remarks

Retrieving the data of a work item does not affect the operation of the work item in any way.

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header mstask.h
Library Mstask.lib
DLL Mstask.dll
Redistributable Internet Explorer 4.0 or later on Windows NT 4.0 and Windows 95

See Also

CoTaskMemFree

IScheduledWorkItem

SetWorkItemData