Share this page

# rdp_get_option

Connection Functions

Retrieves the value of a specified RDP option in a given connection.

int rdp_get_option( "StepDescription=<description>", ["ConnectionID=<connection_identifier>",] "OptionName=<option_name>", "ResultParameter=<parameter_name>", 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.
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.
OptionName | The name of the option. See details below.
ResultParameter | The name of the parameter to store the result value.
RDP_LAST | The delimiter marking the end of the argument list.

The rdp_get_option function retrieves the value of a specified RDP option in a given connection.

The following options are supported:

* DesktopHeight - The height of the RDP session

* DesktopWidth - The width of the RDP session

* BitsPerPixel - Bits per pixel in the RDP session

* SynchedXOffset - The X offset found in the last image synchronization function for the RDP session

* SynchedYOffset - The Y offset found in the last image synchronization function for the RDP session

* KeyboardLayout - The keyboard layout used in RDP session

## Example

This example shows the use of rdp_get_option to retrieve the bits per pixel attribute of an RDP session.

Copy code

    rdp_get_option("StepDescription=Getting option 1",
        "OptionName=BitsPerPixel",
        "ResultParameter=MyParam",
        RDP_LAST );
    lr_log_message( lr_eval_string( "{MyParam}" ) );

Output:

vuser_init.c(42): Getting option BitsPerPixel was successful

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