ITaskHandler::Start method

Called to start the COM handler. This method must be implemented by the handler.

Syntax


HRESULT Start(
  [in] IUnkown *pHandlerServices,
  [in] BSTR    data
);

Parameters

pHandlerServices [in]

An IUnkown interface that is used to communicate back with the Task Scheduler.

data [in]

The arguments that are required by the handler. These arguments are defined in the Data property of the COM handler action.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

When implementing this method, the handler should return control immediately to the Task Scheduler (starting its own thread if inproc).

After the handler starts its processing, it can call the UpdateStatus method to indicate its percentage of completion or call the TaskCompleted method to indicate when the handler has completed its processing. These methods are provided by the ITaskHandlerStatus interface.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Taskschd.h

Library

Taskschd.lib

DLL

Taskschd.dll

See also

ITaskHandler
Data
ITaskHandler
ITaskHandlerStatus
TaskCompleted
UpdateStatus
Task Scheduler

 

 

Show: