IVMMouse::SetButton method

The SetButton method sets the current state (up or down) of the specified mouse button.

Syntax

HRESULT SetButton(
  [in] VMMouseButton buttonIndex,
  [in] VARIANT_BOOL  down
);

Parameters

buttonIndex [in]

The enumerated index of the button whose state is being set.

down [in]

The state of the button. TRUE sets the button state to down, and FALSE sets its state to up.

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 buttonIndex parameter is not valid.
VM_E_MOUSE_NOT_ACTIVE
The operation could not be completed because the mouse device is not powered up, or it is not currently active in the virtual machine.
DISP_E_EXCEPTION
An unexpected error occurred.

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

IVMMouse

VMMouseButton