R
ricolee99
Hi Everyone,
I'm using the System.IO.Ports.SerialPort component to attempt to kill
an existing component opened by another application.
I use the following code:
SerialPort serialPort = new SerialPort ("COM1");
if(serialPort.IsOpen)
{
serialPort.Close();
}
I cannot for the life of me close the opened connection. Each time I
create a dial up connection manually on COM 1, I run this code while
the connection is open. Each time, the serialPort.IsOpen is set to
false even though the dial up connection is open.
Can someone tell me how I can kill or close the COM 1 port if something
has it opened?
Thanks in advance
Eric
I'm using the System.IO.Ports.SerialPort component to attempt to kill
an existing component opened by another application.
I use the following code:
SerialPort serialPort = new SerialPort ("COM1");
if(serialPort.IsOpen)
{
serialPort.Close();
}
I cannot for the life of me close the opened connection. Each time I
create a dial up connection manually on COM 1, I run this code while
the connection is open. Each time, the serialPort.IsOpen is set to
false even though the dial up connection is open.
Can someone tell me how I can kill or close the COM 1 port if something
has it opened?
Thanks in advance
Eric