pcoip_sync_on_bitmap_ex

ExampleTeradici PCoIP Protocol

Computes the hash of a bitmap and waits a specified amount of time for the computed hash to match the hash passed on as parameter.

int pcoip_sync_on_bitmap_ex( long x, long y, long width, long height, char *hash, long timeout, char* waitFor, char* AddOffsetToInput, char* LAST);

xThe horizontal distance, in pixels, of the bitmap's top left edge from the left border of the client window.
yThe vertical distance, in pixels, of the bitmap's top left edge from the upper border of the client window.
widthThe width, in pixels, of the bitmap.
heightThe height, in pixels, of the bitmap.
hashAn encoded string representing the bitmap.
timeoutThe amount of time, in seconds, to wait until the expected hash matches the actual obtained hash.
WaitFor

The event to occur on one of the specified areas and images. This argument is optional.

The function’s behavior with the WaitFor events is as follows:

  • Appear: The function waits for the specified area to match one of the specified images.
  • Change: The function waits for the specified area to match one of the specified images, and then not to match it. That is, the match is found, and then the area changes so that it no longer matches.
  • NotAppear: The function returns LR_FAIL if the image appears before the function reaches timeout. If the timeout is reached and the image has not appeared, the function returns LR_PASS.

The default is Appear.

AddOffsetToInput

The offset is the change in position, from where the image was found during the test run, to where it is found when recorded.

This argument indicates whether to add the offset to subsequent input, for example, mouse-click coordinates. Possible values: "Yes" or "No"

LAST Marker that indicates the end of the argument list.

General

pcoip_sync_on_bitmap_ex is a synchronization function that waits a specified amount of time for a specified bitmap to appear before continuing.

This function is available only where snapshots were taken. For more information, see Teradici PCoIP protocol in the Virtual User Generator Help Center (select the relevant version).

Return Values

E_OK 
E_ALREADY_CONNECTEDDo not call this function after the connection is established.
E_NOT_CONNECTEDAction cannot be performed. There is no connection to the remote server.
E_OUT_OF_TIMEFunction timed out.
E_ILLEGAL_PARAMETERIllegal parameter found.
E_INTERNALInternal error found.

Parameterization

Standard parameterization is not available for this function.

Example

pcoip_sync_on_bitmap_ex is similar to the pcoip_sync_on_bitmap, only it contains its own timeout, instead of waiting for the global timeout.

pcoip_sync_on_bitmap_ex(137, 211, 51, 17,
	"18d962dcbf373e948e83489a19419512", 30,"WaitFor=Appear", "AddOffsetToInput="Yes", LAST);