Collapse All
Parallels C API Reference Guide
PrlDevSecondaryDisplay_AsyncCaptureScaledScreenRegionToBuffer Function
PrlApi.h Secondary Display Capture See Also

Captures a screen area of a secondary display of a remote virtual machine, scales is down to the specified size, and puts it into a buffer.

Syntax
PRL_HANDLE PrlDevSecondaryDisplay_AsyncCaptureScaledScreenRegionToBuffer(
    PRL_HANDLE hVm, 
    PRL_UINT32 display, 
    PRL_IMAGE_FORMAT format, 
    PRL_INT32 quality, 
    PRL_UINT32 x, 
    PRL_UINT32 y, 
    PRL_UINT32 width, 
    PRL_UINT32 height, 
    PRL_UINT32 scaleWidth, 
    PRL_UINT32 scaleHeight
);
File
Parameters

hVm
A handle of type PHT_VIRTUAL_MACHINE identifying the virtual machine.
display
Display ID (0 for primary display, 1, 2, etc.)
format
Image format to use.
quality
Image quality factor. Must be in the range from 0 to 100, or -1. Specify 0 to use the highest data compression, 100 for no compression, and -1 for default.
x
The X coordinate of the upper-left corner of the screen area to capture.
y
The Y coordinate of the upper-left corner of the screen area to capture.
width
The width of the screen area to capture, in pixels.
height
The height of the screen area to capture, in pixels.
scaleWidth
The width of the scaled down image, in pixels.
scaleHeight
The height of the scaled down image, in pixels.
Returns

A handle of type PHT_JOB containing the results of this asynchronous operation or PRL_INVALID_HANDLE if there's not enough memory to instantiate the job object.

Remarks

For local connections, the capture works almost instantly. For remote connections, the data must be transferred over network to the client machine, so it may take some time.

To obtain a pointer to a buffer containing the image, use the PrlJob_GetDataPtr function.

To get the return code from the PHT_JOB object, use the PrlJob_GetRetCode function. Possible value are:

PRL_ERR_INVALID_ARG - invalid handle or null pointer was passed.

PRL_ERR_SUCCESS - function completed successfully.

See Also
Links
Copyright © 1999-2011 Parallels Holdings, Ltd. and its affiliates. All rights reserved.
What do you think about this topic? Send feedback!