IVMTask interface
[Windows Virtual PC is no longer available for use as of Windows 8. Instead, use the Hyper-V WMI provider (V2).]
Use the IVMTask interface to monitor and control asynchronous tasks for various COM methods.
Members
The IVMTask interface inherits from the IDispatch interface. IVMTask also has these types of members:
Methods
The IVMTask interface has these methods.
Method | Description |
---|---|
Cancel | Cancels the task. |
WaitForCompletion | Waits for the task to complete or for the specified time-out interval to elapse. |
Properties
The IVMTask interface has these properties.
Property | Access type | Description |
---|---|---|
Description |
Read-only |
A description of the task. |
Error |
Read-only |
The error recorded for this task. |
ErrorDescription |
Read-only |
The localized error description recorded for this task. |
ID |
Read-only |
A unique identifier for this task. |
IsCancelable |
Read-only |
Indicates whether the task can be canceled. |
IsComplete |
Read-only |
Indicates whether the task has completed. |
PercentCompleted |
Read-only |
The completion percentage of the task. |
Result |
Read-only |
The result of the task. |
Remarks
An IVMTask object is returned by methods that could potentially require a significant amount of time to complete. This allows the application to monitor the progress of the desired operation without forcing it to block further execution while waiting for the completion of the operation.
The following methods return an IVMTask object that can be used to track progress:
- IVMGuestOS::Logoff
- IVMGuestOS::Restart
- IVMGuestOS::Shutdown
- IVMHardDisk::Compact
- IVMHardDisk::Convert
- IVMHardDisk::Merge
- IVMHardDisk::MergeTo
- IVMVirtualMachine::MergeUndoDisks
- IVMVirtualMachine::Reset
- IVMVirtualMachine::Save
- IVMVirtualMachine::Startup
- IVMVirtualMachine::Startup2
- IVMVirtualMachine::TurnOff
- IVMVirtualPC::CreateDifferencingVirtualHardDisk
- IVMVirtualPC::CreateDynamicVirtualHardDisk
- IVMVirtualPC::CreateFixedVirtualHardDisk
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows 7 [desktop apps only] |
Minimum supported server |
None supported |
End of client support |
Windows 7 |
Product |
Windows Virtual PC |
Header |
|
IID |
IID_IVMTask is defined as ab72b222-6e9c-48ae-aa54-85e3e635767c |