Collapse All
Parallels C API Reference Guide
PrlDevDisplay_SyncCaptureScreenRegionToFile Function
PrlApi.h Primary Display Capture See Also

Captures a screen area of a remote virtual machine desktop and saves it to a file on the client machine.

Syntax
PRL_RESULT PrlDevDisplay_SyncCaptureScreenRegionToFile(
    PRL_HANDLE hVm, 
    PRL_CONST_STR fileName, 
    PRL_IMAGE_FORMAT format, 
    PRL_INT32 quality, 
    PRL_UINT32 x, 
    PRL_UINT32 y, 
    PRL_UINT32 width, 
    PRL_UINT32 height
);
File
Parameters

hVm
A handle of type PHT_VIRTUAL_MACHINE identifying the virtual machine.
fileName
Name and path of the file to save the image to.
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 area to capture.
y
The Y coordinate of the upper-left corner of the area to capture.
width
The width of the area to capture, in pixels.
height
The height of the area to capture, in pixels.
Returns

PRL_RESULT . Possible values:

PRL_ERR_INVALID_ARG - invalid handle or null pointer was passed.

PRL_ERR_SUCCESS - function completed successfully.

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. This synchronous function is an equivalent of the asynchronous function PrlDevDisplay_AsyncCaptureScreenRegionToFile . You can use either function in your programs depending on your application needs.

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