Is this serial port code? If so, then you should use the built-in
System.IO.Ports class -- there can be reasons to write your own code, but
this would be unusual. If not serial port code, then you will have to
provide more details.
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.