Serial port error

  • Thread starter Thread starter Catalin Lungu
  • Start date Start date
C

Catalin Lungu

Hi,
I need to know when the serial port COM6 is available. How can I do that ?
What key of registry should I modify to free the port? I use
OpenNETCF.IO.Serial.Port in WinCE 4.2
Most of the times when I try to print I receive the following error
"CreateFile Failed: 55" . I am sure that my app works fine.


T.I.A.
Catalin
 
You can't free the port no matter what you do. To see if the port is
available, you have to open it. If it fails, it's not free. If your code
is actually good, then someone else has that port open and the only way to
prevent the error is to get them to close it.

Paul T.
 
Is it possible that you failed to close the port the last time you printed?
If so, then the CreatFile call will fail with this error. Otherwise, as
Chris says, something else is using the port.

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 
Sorry, Paul said...

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 
Sweet - can you come debug my problems then?

-Chris


"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:[email protected]...
 
Sure, we can swap for the day. Where's that
printing-from-the-browser-in-CE5 problem that I could never get to work? ;-)

Paul T.

Chris Tacke said:
Sweet - can you come debug my problems then?

-Chris


"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:[email protected]...
I'll be Chris for the day, no problem. :-)

Paul T.
 
Back
Top