Virtual Serial Ports - Build advanced serial port configurations for any usage scenario
Docs

Exporting Configuration

This window allows you to export the selected configuration into one of supported formats.

Export Configuration Window

You can choose one of the following formats for export:

TypeScript
The selected device configuration is exported as TypeScript code, for example, the following text is generated when you export a local bridge COM2 ↔ COM4:
///<reference path="hhdvspkit.d.ts" />
var library = (${IVirtualSerialLibrary}) new ActiveXObject("hhdvspkit.VirtualPortLibrary.1");
{
    var port1 = library.${createDevice}(2);
    var port2 = library.${createDevice}(4);
    port1.${createBridge}(port2, false);
}
C#
The selected device configuration is exported as C++ code. For example, the following text is generated when you export remote port COM6:
var library = new hhdvspkit.SerialPortLibrary();
{
    var port = library.${createRemotePort}(6);
    port.${remoteHost} = "servername";
    port.${remotePort} = 1;
    port.${login} = "UserName";
    port.${domain} = "Domain";
    port.${password} = "<password>";
}
C++
The selected device configuration is exported as C++ code. For example, the following text is generated when you export an advanced configuration of a shared port COM5:
hhdvspkit::${ISerialPortLibraryPtr#ISerialPortLibrary} library;
library.CreateInstance(__uuidof(hhdvspkit::SerialPortLibrary));
{
    auto port = library->${createSharedPort}(5);
    port->${sharedPort} = 1;
    port->${baudRate} = 115200;
    port->${dataBits} = 8;
    port->${parity} = hhdvspkit::${PortParity}::MarkParity;
    port->${stopBits} = hhdvspkit::${PortStopBits}::OneAndHalf;
    port->${flowControl} = hhdvspkit::${PortFlowControl}::Hardware;
}
Command-Line
The selected device configuration is exported as one or more command-line text strings. For example, the following configuration creates and configures an alias port COM7:
.\${rspcli.exe} -create alias --local-port 7 --alias-port 1 --baud-rate 57600 --flow-control software

IVirtualSerialLibrary createDevice createBridge ISerialPortLibraryPtr createRemotePort remoteHost remotePort login domain password createSharedPort sharedPort baudRate dataBits parity stopBits flowControl PortParity PortStopBits PortFlowControl rspcli.exe