Επεξεργασία

Κοινή χρήση μέσω


IVMVirtualPCEvents::OnVMStateChange method

[Windows Virtual PC is no longer available for use as of Windows 8. Instead, use the Hyper-V WMI provider (V2).]

Receives notification that a virtual machine's state has changed.

Syntax

HRESULT OnVMStateChange(
  [in] BSTR      virtualMachineConfig,
  [in] VMVMState virtualMachineState
);

Parameters

virtualMachineConfig [in]

The name of the virtual machine.

virtualMachineState [in]

The new state of the virtual machine.

Return value

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

Remarks

The client program must implement this interface method to receive notification of the vmVirtualPCEvent_VMStateChanged event originating from IVMVirtualPC. To monitor a specific virtual machine, use the IVMVirtualMachineEvents::OnStateChange method.

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
VPCCOMInterfaces.h
IID
DIID_IVMVirtualPCEvents is defined as efed1ef1-3c09-41f7-a9c2-7e29fa286c9d

See also

IVMVirtualPCEvents