Close Comm Port opened by another program

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sezgin

    #1

    Close Comm Port opened by another program

    Hi Everyone,

    How can I close Serial Port opened by another program.

    Regards.
  • Theo Verweij

    #2
    Re: Close Comm Port opened by another program

    You can't.

    Sezgin wrote:
    Hi Everyone,
    >
    How can I close Serial Port opened by another program.
    >
    Regards.

    Comment

    • Dick Grier

      #3
      Re: Close Comm Port opened by another program

      Hi,

      You cannot do this with any standard API. You would have to write a
      specialized device driver.

      Or, perhaps, use an available device driver, such as the on from Franson --
      see the links on my homepage; this might work, depending on the details of
      what needs to be done. If you take a look the the Virtual Null Modem/Data
      Monitor program on my homepage, I use the Franson Virtual Serial Port object
      to create a virtual "Y" connector that could be used to connect and
      disconnect an external application from a serial port, thus allowing
      multiple devices to share it. To use this technique, you would not have to
      have access to the source code for the external application that you want to
      disconnect.

      If you have access to the source code for the extenal app, then there are
      simpler methods (simply send it a command to disconnect, by adding an
      appropriate interface).

      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.


      Comment

      Working...