HANDLE handle = CreateFile("COM1".........);DCB dcb;GetCommState(handle, &dcb);dcb.EofChar = 0x1a;dcb.EvtChar = 0x1a;dcb.fDtrControl = DTR_CONTROL_DISABLE;SetCommState(handle, &dcb);