Remote Serial Ports - Network COM Ports/Devices Sharing/Redirecting Software for Windows
Docs

IRemotePortLibrary Interface

interface IRemotePortLibrary {
    // Methods
    ${createPort}(port?: number | string): ${IRemotePortDevice};
    ${getPortsJs}(): ${IRemotePortDevice}[];
    ${getRemoteSharedPortsJs}(hostName: string): ${IRemotePortDescription}[];
    ${installLicenseFile}(path: string): void;
}
public interface IRemotePortLibrary
{
    // Methods
    ${IRemotePortDevice} ${createPort}(object port);
    Array ${getPorts}();
    Array ${getRemoteSharedPorts}(string hostName);
    void ${installLicenseFile}(string path);
    void ${installLicenseInMemory}(byte[] data);
}
struct IRemotePortLibrary : IDispatch
{
    // Methods
    ${IRemotePortDevicePtr#IRemotePortDevice} ${createPort}(const _variant_t & port);
    SAFEARRAY(${IRemotePortDevice}) ${getPorts}();
    SAFEARRAY(${IRemotePortDescription}) ${getRemoteSharedPorts}(_bstr_t hostName);
    HRESULT ${installLicenseFile}(_bstr_t path);
    HRESULT ${installLicenseInMemory}(SAFEARRAY(BYTE) data);
};

IRemotePortLibrary Methods

createPort

createPort(port?: number | string): ${IRemotePortDevice};
${IRemotePortDevice} createPort(object port);
${IRemotePortDevicePtr#IRemotePortDevice} createPort(const _variant_t & port);
port
Port number or a string formatted as COMn. If omitted, a next available port number is automatically selected.

The method returns a reference to created port device.

Create new virtual serial port.

getPorts

// This method is not available in scripting environment
Array getPorts();
SAFEARRAY(${IRemotePortDevice}) getPorts();

This method returns an array of all local virtual serial port devices.

getPortsJs

getPortsJs(): ${IRemotePortDevice}[];
// This method is not available in managed environment
// This method is not available in native environment

This method returns an array of all local virtual serial port devices.

getRemoteSharedPorts

// This method is not available in scripting environment
Array getRemoteSharedPorts(string hostName);
SAFEARRAY(${IRemotePortDescription}) getRemoteSharedPorts(_bstr_t hostName);
hostName
Name of the remote host which ports you want to enumerate.

Method returns an array of IRemotePortDescription objects containing all shared ports on a remote server.

Get a list of all shared serial ports on a remote server specified by hostname parameter.

getRemoteSharedPortsJs

getRemoteSharedPortsJs(hostName: string): ${IRemotePortDescription}[];
// This method is not available in managed environment
// This method is not available in native environment
hostName
Name of the remote host which ports you want to enumerate.

Method returns an array of IRemotePortDescription objects containing all shared ports on a remote server.

Get a list of all shared serial ports on a remote server specified by hostname parameter.

installLicenseFile

installLicenseFile(path: string): void;
void installLicenseFile(string path);
HRESULT installLicenseFile(_bstr_t path);
path
A full path to license file.

Install the given license file. Throws an exception if an error occurs.

installLicenseInMemory

// This method is not available in scripting environment
void installLicenseInMemory(byte[] data);
HRESULT installLicenseInMemory(SAFEARRAY(BYTE) data);
data
License data in memory.

Install the license from the memory buffer.