Пример #1
0
 internal static extern bool SetCommState(SafeFileHandle hFile, ref DCB lpDCB);
Пример #2
0
        private DCB GetParams()
        {
            DCB serialParams = new DCB();
            serialParams.DCBLength = (uint)Marshal.SizeOf(serialParams);

            if (serialHandle != null)
            {
                if (!NativeMethods.GetCommState(serialHandle, ref serialParams))
                    throw new IOException("GetCommState error!");
            }
            return serialParams;
        }
Пример #3
0
 internal static extern bool SetCommState(SafeFileHandle hFile, ref DCB lpDCB);