Пример #1
0
 public Port(string PortName)
 {
     this.hPort = (IntPtr) (-1);
     this.rxBufferSize = 0x400000;
     this.rthreshold = 1;
     this.txBufferSize = 0x400000;
     this.sthreshold = 1;
     this.rxBufferBusy = new Mutex();
     this.dcb = new DCB();
     this.threadStarted = new ManualResetEvent(false);
     this.closeEventName = "CloseEvent";
     this.txOverlapped = IntPtr.Zero;
     this.rxOverlapped = IntPtr.Zero;
     this.Capabilities = new CommCapabilities();
     this.PortName = PortName;
     this.Init();
 }
Пример #2
0
 public Port(string PortName)
 {
     this.hPort          = (IntPtr)(-1);
     this.rxBufferSize   = 0x400000;
     this.rthreshold     = 1;
     this.txBufferSize   = 0x400000;
     this.sthreshold     = 1;
     this.rxBufferBusy   = new Mutex();
     this.dcb            = new DCB();
     this.threadStarted  = new ManualResetEvent(false);
     this.closeEventName = "CloseEvent";
     this.txOverlapped   = IntPtr.Zero;
     this.rxOverlapped   = IntPtr.Zero;
     this.Capabilities   = new CommCapabilities();
     this.PortName       = PortName;
     this.Init();
 }
Пример #3
0
 internal override bool GetCommProperties(IntPtr hPort, CommCapabilities commcap)
 {
     return(Convert.ToBoolean(CEGetCommProperties(hPort, commcap)));
 }
Пример #4
0
 private static extern int CEGetCommProperties(IntPtr hFile, CommCapabilities commcap);
Пример #5
0
		private static extern int WinGetCommProperties(IntPtr hFile, CommCapabilities commcap);
Пример #6
0
		override internal  bool GetCommProperties(IntPtr hPort, CommCapabilities commcap) 
		{
			return Convert.ToBoolean(WinGetCommProperties(hPort, commcap));
		}
Пример #7
0
		internal virtual bool GetCommProperties(IntPtr hPort, CommCapabilities commcap) {return false;} 
Пример #8
0
 internal virtual bool GetCommProperties(IntPtr hPort, CommCapabilities commcap)
 {
     return(false);
 }