SetSettingsFromString Method

Sets serial port settings from the string.

Syntax

Visual Basic
Sub SetSettingsFromString(Settings As String) 
Visual C++ (MFC)
void SetSettingsFromString(LPCTSTR Settings);
Visual C++ (#import)
void SetSettingsFromString(_bstr_t Settings);

Parameters

Settings

[in] String taht contains COM port settings.

Errors

The method may throw exception. Use GetLastError method to get the error code.

Remarks

String of following format: "SPEED,PARITY,BYTE_SIZE,STOP_BITS,FLOW_CONTROL".
For example, "9600,N,8,1,P".

SPEED is a valid baud rate value.
PARITY N - none, O - odd, E - Even, M - Mark, S - Space.
BYTE_SYZE is a valid byte length.
STOP_BITS 1 - one stop bit, 1.5 - 1.5 stop bits, 2 - two stop bits.
FLOW_CONTROL X - XON/XOFF flow control, P - Hardware flow control, N - none.