Hi, i am using visual studio 2008 and developing a windows forms application in C# using .net 3.5.
I am doing serial communication and on loading the application getting a list of all the comm ports available. I then scan for the device i am looking for by opening each port in trun looking for the reply. It all works fine on my PC but when i run the program on a laptop the program thinks there is a COM 3 when there is not such a thing available. I have tried this on to laptops and the same thing happens and i have tried it on another PC and it works fine.
Where is this COM3 comming from?
AlanPosted Oct 16, 2008, 2:12 PM
If you check this registry key using regedit:
HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM
you should see what COM ports are valid (and hence are returned by the SerialPort.GetPortNames method) for your machine.
On my laptop, I have COM1 and COM3 where COM3 is used by the internal modem. I suspect it'll be the same on most other laptops.