Platform SDK: Task Scheduler

IScheduledWorkItem::GetCreator

The GetCreator method retrieves the name of the creator of the work item.

HRESULT GetCreator(
  LPWSTR *ppwszCreator
);

Parameters

ppwszCreator
[out] Pointer a string that contains the name of the creator of the current work item. The application that invokes GetCreator is responsible for freeing this string using the CoTaskMemFree function.

Return Values

The GetCreator method returns one of the following values.

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

Remarks

The following code shows the variable declaration and calling syntax for this method. Note that this method is called through the ITask interface.

LPWSTR ppwszCreator;
hr = pITask->GetCreator(&ppwszCreator);
For a complete example of See
Retrieving the name of the creator of a task C/C++ Code Example: Retrieving the Task Creator

Requirements

  Windows NT/2000: Requires Windows 2000 (or Windows NT 4.0 with Internet Explorer 4.0 or later).
  Windows 95/98: Requires Windows 98 (or Windows 95 with Internet Explorer 4.0 or later).
  Header: Declared in mstask.h.
  Unicode: Defined only as Unicode.

See Also

IScheduledWorkItem, IScheduledWorkItem::SetCreator