Collapse All
Parallels Virtualization SDK
ContentsIndex
PreviousUpNext
PrlVm_UIEmuQueryElementAtPos Function
PHT_VIRTUAL_MACHINE

Posts "get info on element at specified position" query to guest User Input Emulation tool.

Syntax
PRL_RESULT PrlVm_UIEmuQueryElementAtPos(
    PRL_HANDLE hVm, 
    PRL_INT32 posX, 
    PRL_INT32 posY, 
    PRL_INT32 queryId, 
    PRL_UINT32 queryFlags
);
File

PrlApiVm.h

Parameters

hVm
[in] Handle of type PHT_VIRTUAL_MACHINE. Must be valid.
posX
[in] x coordinate within guest screen.
posY
[in] y coordinate within guest screen.
queryId
[in] user-defined value that will be in response.
queryFlags
[in] additional options.

Returns

PRL_RESULT. Possible values: PRL_ERR_UNINITIALIZED - SDK was not properly initialized. PRL_ERR_INVALID_ARG - specified arguments are invalid. PRL_ERR_OUT_OF_MEMORY - memory allocation error during send. PRL_ERR_SUCCESS - function completed successfully.

Remarks

Response will be received via PET_IO_UIEMU_ELEMENT_AT_POS event with PRL_UIEMU_ELEMENT_AT_POS structure on board. Note, that guest tool will not always reply with PET_IO_UIEMU_ELEMENT_AT_POS event. It will reply only when it got some information on UI element at specified position. Since not all versions of User Input Emulation tool support this request and not all guest OS can supply required functionality, use TIS uuid "parallels.UserInputEmulation.guest.win.plugin.UIElement" to get status of that feature. If this uuid is in active state in TIS database, this function can be used. Note, that the lowest version of User Input Emulation tool (TIS uuid "parallels.UserInputEmulation.guest.win.plugin") that can support that request is 1.2 (but it is always enough to check only for "parallels.UserInputEmulation.guest.win.plugin.UIElement").

Links
© 2021 Parallels International GmbH. All rights reserved.