The Open opens a serial port.
BOOL Open( | ||
BSTR PortName | // name of the serial port | |
); |
Parameters
PortName [in] Name of serial port. Could be any but not longer than 128 characters
Return Values If the method succeeds, the return value is TRUE. If the port is already opened or does not exist, the return value is FALSE.
Remarks Use Close method to close the opened serial port. If your program exits without calling Close method, it will be called automatically in serial port object destructor.
If you experience any problems opening COM port which number exceeds 9, you should “escape” it, for instance to open COM 10 use: Open(“\\.\COM10”);
See also