Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Telepathy Communications Library - <b>tp_isport()</b> - check whether serial port exists http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   tp_isport() - check whether serial port exists

   lFound := tp_isport(nPort)

   nPort       Serial port number.

   Returns     TRUE if port installed, FALSE if not found.

   Checks whether the serial port specified by nPort is installed.
   Returns TRUE if the port is found, FALSE otherwise.

   A TRUE return from tp_isport() means that the function found
   something that looked more or less like a serial port installed at
   the correct address.  It does not guarantee that the port can be
   opened, or that it will work correctly if it can.

   Note: This function can case some network cards to lose the
   connection to the network when inquiring about port 3 and above.

   Example:

       ? "The following comm ports are available:"
       for nPort := 1 to 8
           if tp_isport(nPort)
               ? "    COM" + ltrim(str(nPort))
           endif
       next

See Also: tp_open() Why does my

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson