Ask a Question

Getting error about port COM11

Mark1
Contributor

Getting error about port COM11

Recently a portion of my code which uses port COM11 to simulate a scanning barcode feature has stopped working, giving me an error as follows:

 

System.UnauthorizedAccessException: Access to the port 'COM11' is denied

 

This is the code in question, it has always worked for years before I even got the project and now suddenly it doesn't. I have tried rebooting the machine, changing the com port, trying different ports, all giving the same error as above.

 

Dim SerialPort, Port, BaudRate, Parity, DataBits, StopBits
Port = "COM11"
BaudRate = 9600
Parity = None
DataBits = 8
StopBits = 1
Call Delay(1000)
Set SerialPort = dotNet.System_IO_Ports.SerialPort.zctor(Port, BaudRate, Parity, DataBits, StopBits)
SerialPort.Open
SerialPort.Write PLU & Chr(13)
SerialPort.Close

2 REPLIES 2
Marsha_R
Champion Level 2

I suggest contacting Support about this directly.  Here's the link:

https://support.smartbear.com/testcomplete/message

AlexKaras
Champion Level 2

Hi,

 

Parity = None

What is the value for None? Can't it be the root of the problem?

 

Regards,
  /Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
cancel
Showing results for 
Search instead for 
Did you mean: