Compartir a través de


IVMDisplay::SetDimensions method

The SetDimensions method sets the height and width, in pixels, of the virtual machine's display.

Syntax

HRESULT SetDimensions(
  [in] long displayPixelWidth,
  [in] long displayPixelHeight
);

Parameters

displayPixelWidth [in]

The width, in pixels, of the virtual machine's display. The argument must be between the values of 640 and 1600 and be evenly divisible by 8.

displayPixelHeight [in]

The height, in pixels, of the virtual machine's display. The argument must be between the values of 480 and 1200 and be evenly divisible by 8.

Return value

This method can return one of these values.

This method supports standard return values, as well as the following. For information on Virtual Server specific return values not listed below, see HRESULT Codes Specific to the Virtual Server.

Return code Description
S_OK
The operation was successful.
E_INVALIDARG
The parameter is not evenly divisible by 8 or is outside of the allowed minimum (640x480) or maximum (1600x1200) values.
VM_E_VM_UNKNOWN
The virtual machine is not valid or is not currently running.
VM_E_NO_DISPLAY
Unable to locate a valid display for the virtual machine.
VM_E_ADDITIONS_FEATURE_NOT_AVAIL
The version of the additions installed in the guest operating system does not support this operation.
DISP_E_EXCEPTION
An unexpected error occurred.

Remarks

The minimum size of the virtual machine's display is 640 x 480 pixels. The maximum size is 1600 x 1200. Attempts to set the display size to values outside these limits, or to any value not evenly divisible by 8, will result in an E_INVALIDARG error being returned.

Requirements

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

See also

IVMDisplay