IVMVirtualMachineEvents::OnRequestShutdown 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 shutdown request has been made.

Syntax

HRESULT OnRequestShutdown();

Parameters

This method has no parameters.

Return value

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

Remarks

This method is called whenever the virtual machine session is about to shut down. The client program must implement this interface method to receive notification of the vmVirtualMachineEvent_RequestShutdown event originating from IVMVirtualMachine.

This event notification is sent only when the virtual machines session is about to shut down. Operating system shutdown routines, such as IVMGuestOS::Shutdown, do not fire this event directly unless they also attempt to perform a software power off of the virtual hardware.

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_IVMVirtualMachineEvents is defined as 9d84f560-bb67-4961-bd12-a4da780c67e4

See also

IVMVirtualMachineEvents