OpenNetCF Serial & Win CE V5.0 - Can't open port

A

anbeyon

Hi all,

I'm hoping somone out there might be able to help me with this one.

I have recently moved from Win CE 4.2 to Win CE 5.0. Now my
application fails to open the seital ports.

This what I do in my code;

<snippet>

MasterPort.PortName = "COM1:"
MasterPort.Settings.BaudRate = OpenNETCF.IO.Serial.BaudRates.CBR_9600
MasterPort.Settings.StopBits = OpenNETCF.IO.Serial.StopBits.one
MasterPort.Settings.Parity = OpenNETCF.IO.Serial.Parity.none
MasterPort.Settings.ByteSize = 8
MasterPort.Open()

</snippet>

When the MasterPort.Open() line is executed I get the following message
in the debugger.

Unhandled exception 'OpenNETCF.IO.Serial.CommPortException' occured in
OpenNetCF.DLL

Additional information CreateFile failed:55.

Does anyopne have any ideas ?

Hardware stayed the same just moved up to CE5.0 and was ok in CE4.2.

Thanks

Anbeyon
 
G

Guest

1. You're sure it's still COM1:?
2. You're sure nothing else has the port open?

-Chris
 
P

Paul G. Tobey [eMVP]

You can see what ports are available (you can't tell which might already be
open, but you can see which ones exist), by reading the keys in the registry
under HKLM/Drivers/Active. You might verify that COM1 is there...

Paul T.
 
Top