Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FiveWin 1.9.2 - January 97 - opencomm() open the communication port to start using it http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 OpenComm()             Open the communication port to start using it
--------------------------------------------------------------------------------

   Syntax:              OpenComm( <cCommName> [,<nSizeIn>] [,<nSizeOut>] )
                               --> <nIdComm>

   Parameters:

   <cCommName>          The name of the comm device to open in
                        a format like "COM" + N or "LPT" + N

   <nSizeIn>            The size in bytes of the receiving queue.
                        This parameter is ignored for "LPT" devices.
                        By default FiveWin assigns 1024.

   <nSizeOut>           The size in bytes of the transmission queue.
                        This parameter is ignored for "LPT" devices.
                        By default FiveWin assigns 128.

   Returns:

   <nIdComm>            A numeric identifier for that opened device.
                        0 if there was an error.

                        If the function fails, it may return one of the
                        following error values:

                        Value   Meaning

                        IE_BADID        The device identifier is invalid or
                                        unsupported.
                        IE_BAUDRATE     The device's baud rate is unsupported.
                        IE_BYTESIZE     The specified byte size is invalid.
                        IE_DEFAULT      The default parameters are in error.
                        IE_HARDWARE     The hardware is not available (is
                                        locked by another device).
                        IE_MEMORY       The function cannot allocate the queues.
                        IE_NOPEN        The device is not open.
                        IE_OPEN         The device is already open.

                        If this function is called with both queue sizes set
                        to zero, the return value is IE_OPEN if the device is
                        already open or IE_MEMORY if the device is not open.

                        Windows allows COM ports 1 through 9 and LPT ports 1
                        through 3. If the device driver does not support
                        a communications port number, the OpenComm function
                        will fail.

                        The communications device is initialized to a default
                        configuration. The SetCommState function should be used
                        to initialize the device to alternate values.
                        The receiving and transmission queues are used by
                        interrupt-driven device drivers. LPT ports are not
                        interrupt driven--for these ports, the cbInQueue and
                        cbOutQueue parameters are ignored and the queue size
                        is set to zero.

   Sample:              SAMPLES\\TestComm.prg

   Source code:         SOURCE\\WINAPI\\Comm.c

   See also:            CloseComm() WriteComm() ReadComm() BuildCommDcb()
                        SetCommState() FlushComm() GetCommError()


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