Share this page

# rdp_notify_new_clipboard_data

Notifies the Remote Desktop that new data is available on the local machine's clipboard.

Clipboard Functions

int rdp_notify_new_clipboard_data( "StepDescription=<step_description>", "Snapshot=<snapshot>", ["ConnectionID=<connection_identifier>",] "FormatsList=<CF_TEXT|CF_UNICODETEXT|CF_LOCALE>", RDP_LAST );

This function returns LR_PASS (0) on success or LR_FAIL (1) on failure. Note that LR_PASS and LR_FAIL generally indicate whether the function call completed without an exception, and not that the test step succeeded.

All string arguments (char type) can be parameterized using standard parameterization.

Argument | Description
--- | ---
StepDescription | A descriptive, unique name for this step. Use any text.
Snapshot | The name of the snapshot file of the screen state before this step.
ConnectionID | The name of the connection on which this function operates. Do not change the recorded ID. If several connections are open and the ID is not specified, the first connection in the script is used. If only one connection is open, the connection ID is not required.
FormatsList | The format or formats in which the client can provide the clipboard data. The possible formats are `CF_TEXT`, `CF_UNICODETEXT`, and `CF_LOCALE.` Specify a list of formats by separating the format specification with a vertical bar:( | ). Spaces are not allowed in the list. For example: `"FormatsList=CF_TEXT|CF_UNICODETEXT"`
RDP_LAST | The delimiter marking the end of the argument list.

The rdp_notify_new_clipboard_data function sends notification to the server that text has been copied onto the client computer's clipboard.

The FormatsList specifies the format or formats in which the client is capable of providing the information. In the next rdp_send_clipboard_data step, the server is expected to request the data in one of the formats provided in this function.

If more than one format is specified, separate each format with `|'. For example: `CLIP_FORMAT_TEXT|CLIP_FORMAT_UNICODETEXT|CLIP_FORMAT_LOCALE`

The normal flow of clipboard sharing between the local machine and the remote is:

1. rdp_notify_new_clipboard_data is called to inform the remote that clipboard data exists and to list the formats in which it is available.

2. With the call to rdp_send_clipboard_data, the server requests the clipboard content in one of the formats specified in the preceding rdp_notify_new_clipboard_data step.

3. The local machine send the data that corresponds to the requested format.

If the server requests data in a format not passed in the rdp_notify_new_clipboard_data step the text in the first REQUEST_RESPONSE pair in the rdp_notify_new_clipboard_data step is converted to the requested format and sent to the remote. If the conversion fails or is not possible the function fails.

## Example

Sending notification of clipboard data in the client locale.

rdp_notify_new_clipboard_data(

"StepDescription=Notify local clipboard 1",

"Snapshot=snapshot1.inf",

"FormatsList=CLIP_FORMAT_LOCALE",

RDP_LAST );

Tips to improve your search results... VuGen Function Reference Version 26.1 Function Reference 26.1 All View Local Help Center View Online Help Center Version: