Collapse All
Parallels Virtualization SDK
ContentsIndex
PreviousUpNext
PrlDevMouse_SetPos Function
Mouse Control

Moves a mouse pointer to the specified absolute position within the virtual machine display coordinate grid and sends a mouse event (presses or releases the specified button).

Syntax
PRL_RESULT PrlDevMouse_SetPos(
    PRL_HANDLE hVm, 
    PRL_INT32 x, 
    PRL_INT32 y, 
    PRL_INT32 z, 
    PRL_UINT32 buttons
);
File

PrlApiVm.h

Parameters

hVm
A handle of type of PHT_VIRTUAL_MACHINE identifying the machine.
x
X coordinate to move the mouse pointer to.
y
Y coordinate to move the mouse pointer to.
z
Z coordinate to mouse pointer to (scroll).
buttons
Mouse button identifier. See the PRL_MOUSE_BUTTON enumeration for available choices. The values can be combined using the binary OR operator |. To press a button, specify the value identifying the button. To release a button, specify PMB_NOBUTTON. To move the mouse pointer without pressing any buttons, specify PMB_NOBUTTON.

Returns

PRL_RESULT. Possible values: 

PRL_ERR_INVALID_ARG - invalid handle. 

PRL_ERR_SUCCESS - function completed successfully. 

Remarks

This function can only be used if Parallels Tools package is installed in the target virtual machine and if Sliding Mouse feature is enabled. To find out if Sliding Mouse is enabled, use the PrlDevDisplay_IsSlidingMouseEnabled function.

Links
© 2021 Parallels International GmbH. All rights reserved.