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 InitializeDcb()
 {
     SerialPortFixer.Dcb flags = new SerialPortFixer.Dcb();
     this.GetCommStateNative(ref flags);
     flags.Flags = (uint)(flags.Flags & -16385);
     this.SetCommStateNative(ref flags);
 }
Esempio n. 3
0
		private void InitializeDcb()
		{
			SerialPortFixer.Dcb flags = new SerialPortFixer.Dcb();
			this.GetCommStateNative(ref flags);
			flags.Flags = (uint)(flags.Flags & -16385);
			this.SetCommStateNative(ref flags);
		}
Esempio n. 4
0
 private static extern bool GetCommState(SafeFileHandle hFile, ref SerialPortFixer.Dcb lpDcb);