GsmCommMain comm = new GsmCommMain(port, baudRate, timeout); try { if (comStatus) { comm.Open(); // here i got exception (Com 5 Already used by some other process) comStatus = false; Thread.Sleep(20000); if (!comm.IsConnected()) { //AddToLog("Not Connected : Port - " + port); comm.Close(); //return false; } else { if (comMTN) { comm.Close(); comMTN = false; comPortNonMTN = i; i = strport.Length + 1; count = 1; AddToLog("Connected: Port - " + port); return true; } else { AddToLog("Connected: Port - " + port); comm.Close(); return true; } } } } catch (Exception ex) { //return}
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)