IVmApplicationHealthMonitor::SetApplicationState method

Sets the health state of an application that is running in a virtual machine.

Syntax

HRESULT SetApplicationState(
  [in] BSTR              Id,
  [in] BSTR              Name,
  [in] APPLICATION_STATE State
);

Parameters

Id [in]

A BSTR representation of the GUID that identifies the application. It is the calling application's responsibility to create and maintain the identifiers it uses for the applications being monitored.

Name [in]

The display name of the application. This name is used in an informational event log entry for the state change.

State [in]

A value of the APPLICATION_STATE enumeration that specifies the new health state of the application.

Return value

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

Remarks

The state of the applications running in the virtual machine are reflected in the OperationalStatus[1] property value of the Msvm_HeartbeatComponent class.

To use this programming element, the Windows 8 integration components must be installed on the virtual machine that the application is running in.

Requirements

Requirement Value
Minimum supported client
Windows 8 [desktop apps only]
Minimum supported server
Windows Server 2012 [desktop apps only]
Version
Integration components for Windows 8
IDL
VmApplicationHealthMonitor.idl

See also

IVmApplicationHealthMonitor