Hi,
Usually, if you get an error that states that the port already is open (and
you have not yet opened it), the problem is that Windows may have assigned a
mouse driver to the port.
Windows XP can do this during Plug-and-play device identification during the
startup process. The clue is if the device sends data continuously,
regardless of the state of the port. There are a number of devices that do
this, and they confuse Windows -- once confused, the port becomes useless.
This really is a bug in Windows, and the work-around that is provided by
Microsoft does not really work.
If this is your problem, there are only two solutions (today):
1. Make sure that the device is not connected or is not powered up, during
the boot cycle. After Windows has loaded, you can connect the device or
turn on power to it.
2. Use a USB serial port adapter, instead of an internal serial port.
Usually, Windows will then ignore the data it sends, and not misinterpret it
as a mouse.
Dick
--
Richard Grier (Microsoft Visual Basic MVP)
See
www.hardandsoftware.net for contact information.
Author of Visual Basic Programmer's Guide to Serial Communications, 4th
Edition ISBN 1-890422-28-2 (391 pages) published July 2004. See
www.mabry.com/vbpgser4 to order.