TaskServiceRunComHandlerAction Method

Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the ITaskHandler interface.

Definition

Namespace: Microsoft.Win32.TaskScheduler
Assembly: Microsoft.Win32.TaskScheduler (in Microsoft.Win32.TaskScheduler.dll) Version: 2.11.1
public static int RunComHandlerAction(
	Guid clsid,
	string data = null,
	int millisecondsTimeout = -1,
	TaskServiceComHandlerUpdate onUpdate = null
)

Parameters

clsid  Guid
The CLSID of the COM object.
data  String  (Optional)
An optional string passed to the COM object at startup.
millisecondsTimeout  Int32  (Optional)
The number of milliseconds to wait or -1 for indefinitely.
onUpdate  TaskServiceComHandlerUpdate  (Optional)
An optional TaskServiceComHandlerUpdate delegate that is called when the COM object calls the UpdateStatus(Int16, String) method.

Return Value

Int32
The value set by the COM object via a call to the TaskCompleted(Int32) method.

See Also