 | TaskServiceRunComHandlerActionAsync Method |
Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the
ITaskHandler interface.
Namespace:
Microsoft.Win32.TaskScheduler
Assembly:
Microsoft.Win32.TaskScheduler (in Microsoft.Win32.TaskScheduler.dll) Version: 2.10.1
Syntaxpublic static void RunComHandlerActionAsync(
Guid clsid,
Action<int> onComplete,
string data = null,
int millisecondsTimeout = -1,
TaskServiceComHandlerUpdate onUpdate = null
)
Public Shared Sub RunComHandlerActionAsync (
clsid As Guid,
onComplete As Action(Of Integer),
Optional data As String = Nothing,
Optional millisecondsTimeout As Integer = -1,
Optional onUpdate As TaskServiceComHandlerUpdate = Nothing
)
public:
static void RunComHandlerActionAsync(
Guid clsid,
Action<int>^ onComplete,
String^ data = nullptr,
int millisecondsTimeout = -1,
TaskServiceComHandlerUpdate^ onUpdate = nullptr
)
Request Example
View SourceParameters
- clsid
- Type: SystemGuid
The CLSID of the COM object. - onComplete
- Type: SystemActionInt32
The action to run on thread completion. - data (Optional)
- Type: SystemString
An optional string passed to the COM object at startup. - millisecondsTimeout (Optional)
- Type: SystemInt32
The number of milliseconds to wait or -1 for indefinitely. - onUpdate (Optional)
- Type: Microsoft.Win32.TaskSchedulerTaskServiceComHandlerUpdate
An optional TaskServiceComHandlerUpdate delegate that is called when the COM object calls the
UpdateStatus(Int16, String) method.
See Also