Share via


IVMTask2 interface

The IVMTask2 interface extends the IVMTask interface, adding a property to return the remote HRESULT value and a text description of the error.

When to use

Use the IVMTask2 interface to monitor and control asynchronous tasks for COM methods.

Members

The IVMTask2 interface inherits from IVMTask and IDispatch. IVMTask2 also has these types of members:

Methods

The IVMTask2 interface has these methods.

Method Description
Cancel Cancels the task.
WaitForCompletion Waits for the task to complete or until the specified timeout expires.
(Inherited from IVMTaskVMTaskIVMTask2VMTask2)

Properties

The IVMTask2 interface has these properties.

Property Access type Description
Description
Read-only
The description of the task.
(Inherited from IVMTaskVMTaskIVMTask2VMTask2)
Error
Read-only
The value (HRESULT) of the error.
(Inherited from IVMTask2VMTask2)
ErrorDescription
Read-only
The error description for this task.
(Inherited from IVMTask2VMTask2)
ID
Read-only
The unique ID for the task.
(Inherited from IVMTaskVMTaskIVMTask2VMTask2)
IsCancelable
Read-only
Indicates whether the task can be canceled before completion.
(Inherited from IVMTaskVMTaskIVMTask2VMTask2)
IsComplete
Read-only
Indicates whether the task has completed.
(Inherited from IVMTaskVMTaskIVMTask2VMTask2)
PercentCompleted
Read-only
The completion percentage of the task.
(Inherited from IVMTaskVMTaskIVMTask2VMTask2)
Result
Read-only
The result of the task.
(Inherited from IVMTaskVMTaskIVMTask2VMTask2)

Remarks

An IVMTask2 object is returned by methods which could potentially require a significant amount of time to complete. This allows the user program to monitor the progress of the desired operation without forcing the program to block further execution while waiting for the completion of the operation.

The following methods return an IVMTask2 object:

Requirements

Download
Microsoft Virtual Server 2005 R2 SP1 Update onWindows Server 2008orWindows Server 2003
Header
VsComInterfaces.h