Fran Porretto wrote:
::GetCommState(hComm, dcb);
The above line is wrong. You should use the address of the DCB struct:
::GetCommState(hComm, &dcb);
SetCommState
shouldn't raise any exception (unless
dcb.DCBlength
is wrong, of course).
What kind of error did you get? Could you please report it, exactly, here?