Virtual Serial Port ActiveX Control - CreatePort Method

The CreatePort method creates new virtual serial port.  

BOOL CreatePort(
  BSTR PortName // name of the virtual serial port
);

Parameters
  PortName     [in] Name of virtual serial port to be created. Could be any but not longer than 128 characters
Return Values
  If the function succeeds, the return value is TRUE. If the port is already created or no virtual serial bus is present in the system or virtual serial port could not be created for any other reason, the return value is FALSE.
Remarks   Use Delete method to delete created virtual serial port. If your program exits without calling Delete method, it will be called automatically in virtual serial port object destructor.


See also

Delete method , Attach method