Hi,
For the most part, this may not be practical. There are commercial products
that do this, by creating a virtual device driver that permits some forms of
sharing (Eltima and Franson are keywords that you can use to search Google).
Also, I have a VB code example in my book (see below) for serial port
sharing. However, it requires that you have control of all code that is
sharing the port, and that you write your code with an understanding of the
limitations of such sharing.
If you tell me more about what you really need, I may be able to offer some
more specific suggestions.
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.