Collapse All
Parallels Virtualization SDK
ContentsIndex
PreviousUpNext
Remote Desktop Access
Topics

This chapter contains information about functions that can be used to remotely capture screen shots of a virtual machine desktop and to send keyboard and mouse commands to it.

Description

With this functionality, you can programmatically connect to a remote virtual machine and run its applications as if you were sitting at the virtual machine's console. The typical uses of the Remote Desktop Access functionality are:

  1. Creating automation scripts for unattended operating system and other software installations.
  2. Creating your own remote desktop applications with graphical user interfaces.

There are four groups of functions comprising the Remote Desktop Access API :

  1. Primary display capture. These functions allow to capture a region or an entire screen of the remote virtual machine. In scripts, you can take a snapshot of a particular screen in advance and then compare it to the screen captured at runtime. If comparison operation determines that you've got the screen of interest, you can interact with it by sending mouse or keyboard commands (pressing buttons, making selections, etc.). In a GUI application, you can constantly capture screens (or screen regions) and display them to the user of your application, thus providing a real-time remote desktop access to a virtual machine.
  2. Secondary display capture. This group of functions is almost identical to the Primary Display Capture group with the exception that it operates on a secondary display(s) if one is installed in a virtual machine.
  3. Mouse control. These functions provide control over the mouse in a virtual machine. You can change the position of the mouse pointer, press and release mouse buttons, and use a scroll wheel. In GUI applications, you can capture mouse events in the host OS where the application is running and then transmit those events to the virtual machine. In scripts, you can move a mouse pointer to the coordinates you know in advance (coordinates of a button, an edit control, etc.) and perform an action.
  4. Keyboard control. These functions simply send a key/action code combination to the virtual machine. In scripts, you can use these functions to interact with controls on a window opened inside a virtual machine (pressing buttons, selecting options, etc.). In a typical GUI application, essential visual controls usually have keyboard shortcuts (accelerator keys) assigned to them. If a control doesn't have a shortcut, then you will have to use mouse control functions to position a mouse pointer over the control to select it.

Every remote desktop access session must begin with PrlDevDisplay_ConnectToVm function call and end with the PrlDevDisplay_DisconnectFromVm call. 

For more information and code samples, please see Parallels Virtualization SDK Programmer's Guide.

Topics
Name 
Description 
Functions in this group provide functionality for remote sound playback. 
Functions in this group provide functionality for sending keyboard commands to a remote virtual machine. 
Functions in this group provide functionality for sending mouse commands to a remote virtual machine. 
Functions in this group provide functionality for capturing screen shots of a remote virtual machine desktop. 
Functions in this group provide functionality for capturing screen shots of a secondary display if one is installed in a virtual machine. 
Links
© 2021 Parallels International GmbH. All rights reserved.