Sets the COM port name to be displayed on the local computer when the real port is connected from another computer. E.g. we have COM1 on another computer and we want it connected to a local computer with COM3 name. So we set COM3 as the new name for the port.

int WINAPI FH_SetComportNameAsync(
        ID_VAR idComp,
        STR_VAR idDevice,
        STR_VAR comportName,
        int timeoutMs);


  • idComp – the computer’s ID
  • idDevice – the device’s ID
  • comportName – new COM port name to be displayed on a local machine upon its connection
  • 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.