Share via


IVMMouse::GetButton method

The GetButton method returns the current state (up or down) of the specified mouse button.

Syntax

HRESULT GetButton(
  [in]  VMMouseButton buttonIndex,
  [out] VARIANT_BOOL  *isDown
);

Parameters

buttonIndex [in]

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

isDown [out]

The state of the indicated button. TRUE if the button is currently down in the virtual machine.

Return value

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_POINTER
The isDown parameter is NULL.
E_INVALIDARG
The buttonIndex parameter is not valid.
VM_E_VM_NOT_RUNNING
The virtual machine to which this mouse device is attached is not currently running.
VM_E_MOUSE_NOT_ACTIVE
The mouse device has not been powered up.
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