Quantcast
Channel: Eltima Software – Knowledge Base
Viewing all articles
Browse latest Browse all 959

FH_ConnectDeviceAsync

$
0
0

FH_ConnectDeviceAsync

Connects to a device on another computer.

int WINAPI FH_ConnectDeviceAsync(
        ID_VAR idComp,
        STR_VAR idDevice,
        JSON_VAR jsonParameters,
        int timeoutMs);

Here:

  • idComp – the computer’s ID
  • idDevice – the device’s ID
  • jsonParameters – optional connection parameters (compression type, etc.) in the format of JSON object of {“compress”:XXX} type. The default parameters are used in case the empty string or object is passed. Refer to FH_SetDefaultConnectParameters
  • timeoutMs – timeout. By default equals to –1.

The returned value is the ID of the invoked command or 0 in case the command cannot be executed.
The result of the command execution is returned by command_result event.

The error codes upon the command completion:
* “not_found_dev” – the specified device not found
* “tcp_error” – not able to establish connection
* “no_driver” – the required drivers (for virtual USB and COM ports) are not installed on one of the computers
* “max_connections” – the limitation for the maximum number of concurrent connections in the account is reached


Viewing all articles
Browse latest Browse all 959

Trending Articles