Esempio n. 1
0
        private void GetCommStateNative(ref SerialPortFixer.Dcb lpDcb)
        {
            int num = 0;

            SerialPortFixer.Comstat comstat = new SerialPortFixer.Comstat();
            int num1 = 0;

            while (num1 < 10)
            {
                if (!SerialPortFixer.ClearCommError(this.m_Handle, ref num, ref comstat))
                {
                    SerialPortFixer.WinIoError();
                }
                if (!SerialPortFixer.GetCommState(this.m_Handle, ref lpDcb))
                {
                    if (num1 == 9)
                    {
                        SerialPortFixer.WinIoError();
                    }
                    num1++;
                }
                else
                {
                    return;
                }
            }
        }
Esempio n. 2
0
		private void GetCommStateNative(ref SerialPortFixer.Dcb lpDcb)
		{
			int num = 0;
			SerialPortFixer.Comstat comstat = new SerialPortFixer.Comstat();
			int num1 = 0;
			while (num1 < 10)
			{
				if (!SerialPortFixer.ClearCommError(this.m_Handle, ref num, ref comstat))
				{
					SerialPortFixer.WinIoError();
				}
				if (!SerialPortFixer.GetCommState(this.m_Handle, ref lpDcb))
				{
					if (num1 == 9)
					{
						SerialPortFixer.WinIoError();
					}
					num1++;
				}
				else
				{
					return;
				}
			}
		}
Esempio n. 3
0
 private static extern bool ClearCommError(SafeFileHandle hFile, ref int lpErrors, ref SerialPortFixer.Comstat lpStat);