home *** CD-ROM | disk | FTP | other *** search
/ CD Shareware Magazine 1996 December / CD_shareware_12-96.iso / WIN / Programa / WSC4VB10.ZIP / WSC4VB_R.DOC < prev    next >
Encoding:
Text File  |  1996-08-26  |  29.8 KB  |  1,022 lines

  1.  
  2.  
  3.                  Windows Standard Communications
  4.  
  5.                      Library for Visual Basic
  6.  
  7.                              (WSC4VB)
  8.  
  9.  
  10.                         REFERENCE MANUAL
  11.  
  12.  
  13.  
  14.                             Version 1.0
  15.  
  16.                            August 25, 1996
  17.  
  18.  
  19.  
  20.  
  21.                  This software is provided as-is.
  22.           There are no warranties, expressed or implied.
  23.  
  24.  
  25.  
  26.  
  27.                        Copyright (C) 1996
  28.                        All rights reserved
  29.  
  30.  
  31.  
  32.                    MarshallSoft Computing, Inc.
  33.                        Post Office Box 4543
  34.                        Huntsville AL 35815
  35.  
  36.                        Voice : 205-881-4630
  37.                          FAX : 205|880|0925
  38.                          BBS : 205-880-9748
  39.                        email : info@marshallsoft.com
  40.                          web : www.marshallsoft.com
  41.  
  42.                            _______
  43.                       ____|__     |                (R)
  44.                    --+       |    +-------------------
  45.                      |   ____|__  |  Association of
  46.                      |  |       |_|  Shareware
  47.                      |__|   o   |    Professionals
  48.                    --+--+   |   +---------------------
  49.                         |___|___|    MEMBER
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  WSC4VB Reference Manual                                                Page 1
  69.                         C O N T E N T S
  70.  
  71.  
  72.  
  73.     Chapter                                     Page
  74.  
  75.     Table of Contents.............................2
  76.     List of Functions.............................3
  77.        SioBaud....................................3
  78.        SioBrkSig..................................3
  79.        SioCTS.....................................4
  80.        SioDCD.....................................4
  81.        SioDone....................................5
  82.        SioDSR.....................................5
  83.        SioDTR.....................................6
  84.        SioFlow....................................6
  85.        SioGetc....................................7
  86.        SioGets....................................7
  87.        SioInfo....................................8
  88.        SioParms...................................8
  89.        SioPutc....................................9
  90.        SioPuts....................................9
  91.        SioReset..................................10
  92.        SioRI.....................................10
  93.        SioRTS....................................11
  94.        SioRxClear................................11
  95.        SioRxQue..................................12
  96.        SioStatus.................................12
  97.        SioTxClear................................13
  98.        SioTxQue..................................13
  99.        SioUnGetc.................................14
  100.     Function Summary.............................14
  101.     Error Code Summary...........................15
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  WSC4VB Reference Manual                                                Page 2
  137.   +-------------+------------------------------------------------------------+
  138.   |   SioBaud   |  Sets the baud rate of the selected port.                  |
  139.   +-------------+------------------------------------------------------------+
  140.  
  141.  
  142.     Syntax    FUNCTION SioBaud(ByVal Port,ByVal BaudCode)
  143.               REM Port     : Port selected.
  144.               REM BaudCode : Baud code or actual baud rate.
  145.  
  146.    Remarks    The  SioBaud  function sets the baud rate without resetting  the
  147.               port. It is used to change the baud rate after calling SioReset.
  148.  
  149.               SioBaud  may be called with either the actual baud rate value or
  150.               one of the baud rate codes as follows:
  151.  
  152.                Code   Rate    Name             Code   Rate   Name
  153.                  0     300    Baud300            5    9600   Baud9600
  154.                  1     600    Baud600            6   19200   Baud19200
  155.                  2    1200    Baud1200           7   38400   Baud38400
  156.                  3    2400    Baud2400           8   57600   Baud57600
  157.                  4    4800    Baud4800
  158.  
  159.  
  160.    Returns       IE_BADID : No such port.
  161.               IE_BAUDRATE : Unsupported baud rate.
  162.  
  163.   See Also    SioReset
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.   +-------------+------------------------------------------------------------+
  171.   |  SioBrkSig  |  Asserts, cancels, or detects BREAK signal.                |
  172.   +-------------+------------------------------------------------------------+
  173.  
  174.  
  175.     Syntax    FUNCTION SioBrkSig(ByVal Port,ByVal Cmd)
  176.               REM Port : Port selected.
  177.               REM Cmd  : ASSERT, CANCEL, or DETECT
  178.  
  179.    Remarks    The SioBrkSig function controls the BREAK bit in the line status
  180.               register. The legal commands are:
  181.  
  182.               ASSERT_BREAK : ASC("A") to assert BREAK
  183.               CANCEL_BREAK : ASC("C") to cancel BREAK
  184.               DETECT_BREAK : ASC("D") to detect BREAK
  185.  
  186.               ASSERT_BREAK, CANCEL_BREAK,  and  DETECT_BREAK  are  defined  in
  187.               WSC4VB.BAS. See TERM.BAS for an example of the use of SioBrkSig.
  188.  
  189.    Returns     IE_NOPEN : Port not opened. Call SioReset first.
  190.                IE_BADID : No such port.
  191.               WSC_RANGE : Illegal command. Expected 'A', 'C', or 'D'.
  192.                      >0 : BREAK signal detected (DETECT command only)
  193.  
  194.   See Also    SioBrkKey
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  WSC4VB Reference Manual                                                Page 3
  205.   +-------------+------------------------------------------------------------+
  206.   |   SioCTS    |  Reads the Clear to Send (CTS) modem status bit.           |
  207.   +-------------+------------------------------------------------------------+
  208.  
  209.     Syntax    FUNCTION SioCTS(ByVal Port)
  210.               REM Port : Port selected.
  211.  
  212.  
  213.    Remarks    The SioCTS function is used to detect if CTS (Cleat To Send) has
  214.               changed since the last call to SioCTS.
  215.  
  216.               The  CTS  line  is  used  by  some  error  correcting  modems to
  217.               implement hardware flow control.  CTS is dropped by the modem to
  218.               signal the computer not to send data  and is  raised  to  signal
  219.               the computer to continue.
  220.  
  221.               Refer to the User's Manual for a discussion of flow control.
  222.  
  223.    Returns    IE_NOPEN : Port not opened. Call SioReset first.
  224.               IE_BADID : No such port.
  225.                      0 : CTS has not changed.
  226.                     >0 : CTS has changed.
  227.  
  228.   See Also    SioFlow, SioDSR, SioRI, SioDCD, and SioModem.
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.   +-------------+------------------------------------------------------------+
  245.   |   SioDCD    |  Reads the Data Carrier Detect (DCD) modem staus bit.      |
  246.   +-------------+------------------------------------------------------------+
  247.  
  248.  
  249.     Syntax    FUNCTION SioDCD(ByVal Port)
  250.               REM Port : Port selected.
  251.  
  252.    Remarks    The  SioDCD  function is  used to read the Data Carrier Detect
  253.               (DCD) modem status bit. Also see SioModem.
  254.  
  255.    Returns    IE_NOPEN : Port not opened. Call SioReset first.
  256.               IE_BADID : No such port.
  257.                      0 : DCD is clear.
  258.                     >0 : DCD is set.
  259.  
  260.   See Also    SioDSR, SioCTS, SioRI, and SioModem.
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  WSC4VB Reference Manual                                                Page 4
  273.   +-------------+------------------------------------------------------------+
  274.   |   SioDone   |  Terminates further serial processing.                     |
  275.   +-------------+------------------------------------------------------------+
  276.  
  277.  
  278.     Syntax    FUNCTION SioDone(ByVal Port)
  279.               REM Port : Port selected.
  280.  
  281.    Remarks    The  SioDone  function  terminates  further  serial  processing,
  282.               allowing other applications to use the port.
  283.  
  284.    Returns    IE_NOPEN : Port not opened. Call SioReset first.
  285.               IE_BADID : No such port.
  286.  
  287.   See Also    SioReset.
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.   +-------------+------------------------------------------------------------+
  301.   |    SioDSR   |  Reads the Data Set Ready (DSR) modem status bit.          |
  302.   +-------------+------------------------------------------------------------+
  303.  
  304.  
  305.     Syntax    FUNCTION SioDSR(ByVal Port)
  306.               REM Port : Port selected.
  307.  
  308.    Remarks    The  SioDSR  function is used to detect if DSR (Data Set Ready)
  309.               has changed since the last call to SioDSR.
  310.  
  311.    Returns    IE_NOPEN : Port not opened. Call SioReset first.
  312.               IE_BADID : No such port.
  313.                      0 : DSR has not changed.
  314.                     >0 : DSR has changed.
  315.  
  316.   See Also    SioCTS, SioRI, SioDCD, and SioModem
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  WSC4VB Reference Manual                                                Page 5
  341.   +-------------+------------------------------------------------------------+
  342.   |    SioDTR   |  Set, clear, or read Data Terminal Ready (DTR) status bit. |
  343.   +-------------+------------------------------------------------------------+
  344.  
  345.  
  346.     Syntax    FUNCTION SioDTR(ByVal Port,ByVal Cmd)
  347.               REM Port : Port selected.
  348.               REM Cmd  : DTR command (see below).
  349.  
  350.    Remarks    The SioDTR function controls the Data Terminal Ready (DTR) bit
  351.               in the modem control register.  DTR should always  be  set  when
  352.               communicating with a modem.  Commands  (defined  in  WSC4VB.BAS)
  353.               are:
  354.  
  355.               SET_LINE   : ASC("S")  to set DTR (ON)
  356.               CLEAR_LINE : ASC("C")  to clear DTR (OFF)
  357.               READ_LINE  : ASC("R")  to read DTR
  358.  
  359.    Returns    IE_NOPEN  : Port not opened. Call SioReset first.
  360.               IE_BADID  : No such port.
  361.               WSC_RANGE : Not one of 'S', 'C', or 'R'.
  362.                       0 : DTR is OFF (READ_LINE Command).
  363.                      >0 : DTR is ON (READ_LINE Command).
  364.  
  365.   See Also    SioRTS.
  366.  
  367.  
  368.  
  369.   +------------+-------------------------------------------------------------+
  370.   |   SioFlow  |  Sets hardware (RTS/CTS) flow control.                      |
  371.   +------------+-------------------------------------------------------------+
  372.  
  373.  
  374.     Syntax    FUNCTION SioFlow(ByVal Port,ByVal Cmd)
  375.               REM Port : Port selected.
  376.               REM Cmd  : Class of flow control (see below).
  377.  
  378.    Remarks    The SioFlow function is used to enable or disable hardware  flow
  379.               control.  Hardware flow control uses RTS and CTS to control data
  380.               flow  between  the  modem  and the computer.  To enable hardware
  381.               flow control, call SioFlow with Cms set to one of:
  382.  
  383.                 Cmd     Flow Control
  384.               ASC("H")  Hardware (RTS/CTS) flow control.
  385.               ASC("S")  Software (XON/XOFF) flow control.
  386.               ASC("N")  No flow control.
  387.  
  388.               In order for hardware flow control to work correctly, your modem
  389.               must also be configured to work with hardware flow control,  and
  390.               your  computer  to  modem  cable  must  have  RTS  and CTS wired
  391.               straight through. If you enable hardware flow  control,  do  not
  392.               modify  the  RTS  line  (by  calling  SioRTS).
  393.  
  394.               Flow control is disabled after resetting a port.  To  explicitly
  395.               disable hardware flow control, call SioFlow with Tics=-1.
  396.  
  397.    Returns     IE_NOPEN : Port not opened. Call SioReset first.
  398.                IE_BADID : No such port.
  399.               WSC_RANGE : Cannot recognize Cmd.
  400.                     -1  : Flow control disabled.
  401.                     >0  : Flow control enabled.
  402.  
  403.   See Also    SioPutc
  404.  
  405.  
  406.  
  407.  
  408.  WSC4VB Reference Manual                                                Page 6
  409.   +------------+-------------------------------------------------------------+
  410.   |   SioGetc  |  Reads the next character from the serial line.             |
  411.   +------------+-------------------------------------------------------------+
  412.  
  413.  
  414.     Syntax    FUNCTION SioGetc(ByVal Port)
  415.               REM Port : Port selected.
  416.  
  417.    Remarks    The SioGetc function reads a byte from the selected serial port.
  418.               A WSC_NO_DATA (-100) is returned if no byte is available.
  419.  
  420.  
  421.    Returns    IE_NOPEN    : Port not opened. Call SioReset first.
  422.               IE_BADID    : No such port.
  423.               WSC_NO_DATA : If timed out.
  424.                      >= 0 : Character read.
  425.  
  426.   See Also    SioUnGetc and SioGets.
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.   +------------+-------------------------------------------------------------+
  436.   |   SioGets  |  Reads the next byte buffer from the serial line.           |
  437.   +------------+-------------------------------------------------------------+
  438.  
  439.  
  440.     Syntax    FUNCTION SioGetc(ByVal Port,ByVal Buffer As String, ByVal Cnt)
  441.               REM Port   : Port selected
  442.               REM Buffer : Receive buffer
  443.               REM Cnt    : Number bytes wanted
  444.  
  445.    Remarks    The SioGets function reads the smaller of the  number  of  bytes
  446.               wanted  (Cnt)  and  the number of bytes in the recieve buffer. A
  447.               zero is return if no bytes are read.
  448.  
  449.  
  450.    Returns    IE_NOPEN : Port not opened. Call SioReset first.
  451.               IE_BADID : No such port.
  452.                   >= 0 : Number of characters actually read.
  453.  
  454.   See Also    SioUnGetc and SioPutc.
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  WSC4VB Reference Manual                                                Page 7
  477.   +-------------+------------------------------------------------------------+
  478.   |   SioInfo   |  Returns WSC4VB library information.                       |
  479.   +-------------+------------------------------------------------------------+
  480.  
  481.  
  482.     Syntax    FUNCTION SioInfo(ByVal Cmd)
  483.               REM Cmd : Command (See below)
  484.  
  485.    Remarks    The  SioInfo  function returns an integer code  corresponding to
  486.               the Cmd as follows.
  487.  
  488.               Command   SioInfo returns
  489.               ASC("V")  Library version number.
  490.  
  491.  
  492.    Returns    See remarks above.
  493.               -1 : Cannot recognize Cmd.
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.   +-------------+------------------------------------------------------------+
  501.   |  SioParms   |  Sets parity, stop bits, and word length.                  |
  502.   +-------------+------------------------------------------------------------+
  503.  
  504.  
  505.    Syntax     FUNCTION SioParms(ByVal Port,ByVal Parity,
  506.                                   ByVal StopBits,ByVal DataBits)
  507.               REM Port     : Port selected.
  508.               REM Parity   : Parity code [0,1,2].
  509.               REM StopBits : Stop bits code [0,1].
  510.               REM DataBits : Word length code [0,1,2,3].
  511.  
  512.    Remarks    The SioParms function sets  the  parity,  stop  bits,  and  word
  513.               length.   If  the  default parity (none), stop bits (1), or word
  514.               length (8) is not  acceptable,  then  they  can  be  changed  by
  515.               calling SioParms.  SioParms can be called either before or after
  516.               calling SioReset. See file WSC4VB.BAS.
  517.  
  518.               Use  the  constant  values defined in WSC4VB.BAS to minimize the
  519.               chance of passing an incorrect parameter value.
  520.  
  521.                             Value   Description    WSC4VB.BAS Name
  522.               ParityCode:    *0      no parity      NoParity
  523.                               1      odd parity     OddParity
  524.                               2      even parity    EvenParity
  525.               StopBitsCode:  *0      1 stop bit     OneStopBit
  526.                               2      2 stop bits    TwoStopBits
  527.               WordLengthCode: 5      5 data bits    WordLength5
  528.                               6      6 data bits    WordLength6
  529.                               7      7 data bits    WordLength7
  530.                              *8      8 data bits    WordLength8
  531.  
  532.   Returns        IE_BADID : No such port.
  533.               IE_BYTESIZE : Word length not supported.
  534.                 WSC_RANGE : Parameter out of range.
  535.  
  536.  See Also    SioReset.
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  WSC4VB Reference Manual                                                Page 8
  545.   +-------------+------------------------------------------------------------+
  546.   |   SioPutc   |  Transmit a character over a serial line.                  |
  547.   +-------------+------------------------------------------------------------+
  548.  
  549.  
  550.     Syntax    FUNCTION SioPutc(ByVal Port,ByVal Ch)
  551.               REM Port : Port selected.
  552.               REM Ch   : Character to send [ASC(char)]
  553.  
  554.    Remarks    The SioPutc function copies the character to the transmit queue
  555.               for subsequent transmission.
  556.  
  557.  
  558.    Returns     IE_NOPEN : Port not opened. Call SioReset first.
  559.               IE_BADID : No such port.
  560.                      0 : No error.
  561.  
  562.   See Also    SioGetc and SioFlow.
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.   +-------------+------------------------------------------------------------+
  574.   |   SioPuts   |  Transmits a byte buffer over a serial line.               |
  575.   +-------------+------------------------------------------------------------+
  576.  
  577.  
  578.     Syntax    FUNCTION SioPutc(ByVal Port,ByVal Buffer As String,ByVal Cnt)
  579.               REM Port   : Port selected.
  580.               REM Buffer : String of bytes to transmit.
  581.  
  582.    Remarks    The SioPuts function copies the characters to the transmit queue
  583.               for subsequent transmission.
  584.  
  585.  
  586.    Returns     IE_NOPEN : Port not opened. Call SioReset first.
  587.               IE_BADID : No such port.
  588.                   >= 0 : The number of bytes actually transmitted.
  589.  
  590.   See Also    SioGetc and SioFlow.
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  WSC4VB Reference Manual                                                Page 9
  613.   +-------------+------------------------------------------------------------+
  614.   |  SioReset   |  Initialize a serial port for processing.                  |
  615.   +-------------+------------------------------------------------------------+
  616.  
  617.  
  618.     Syntax    FUNCTION SioReset(ByVal Port,ByVal RxQueSize,ByVal TxQueSize)
  619.               REM Port      : Port selected.
  620.               REM RxQueSize : Receive queue size.
  621.               REM TxQueSize : Transmit queue size.
  622.  
  623.    Remarks    The SioReset function  initializes  the  selected  serial  port.
  624.               SioReset  should  be  called  before  making  any other calls to
  625.               WSC4VB.  SioReset uses the parity, stop bits,  and  word  length
  626.               value  previously  set  if  SioParm  was  called,  otherwise the
  627.               default values (see SioParm) are used.
  628.  
  629.               Recall that COM1 and COM3 share the same  interrupt  vector  and
  630.               therefore  cannot  operate  simultaneously. Similiarly, COM2 and
  631.               COM4 cannot operate simultaneously. Any other combination of two
  632.               ports can be used.
  633.  
  634.    Returns       IE_BADID : No such port.
  635.                   IE_OPEN : Already open.
  636.                 IE_MEMORY : Cannot allocate memory.
  637.               IE_HARDWARE : Hardware error.
  638.  
  639.   See Also    SioBaud, SioParms, and SioDone.
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.   +-------------+------------------------------------------------------------+
  647.   |    SioRI    |  Reads the Ring Indicator (RI) modem status bit.           |
  648.   +-------------+------------------------------------------------------------+
  649.  
  650.  
  651.     Syntax    FUNCTION SioRI(ByVal Port)
  652.               REM Port : Port selected.
  653.  
  654.    Remarks    The SioRI function is used to read the Ring  Indicator
  655.               (RI) modem status bit. Also see SioModem.
  656.  
  657.    Returns    IE_NOPEN : Port not opened. Call SioReset first.
  658.               IE_BADID : No such port.
  659.                      0 : RI is clear.
  660.                     >0 : RI is set (RING has occurred).
  661.  
  662.   See Also    SioDSR, SioCTS, SioDCD, and SioModem.
  663.  
  664.  
  665.  
  666.  
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674.  
  675.  
  676.  
  677.  
  678.  
  679.  
  680.  WSC4VB Reference Manual                                                Page 10
  681.   +-------------+------------------------------------------------------------+
  682.   |    SioRTS   |  Sets, clears, or reads the Request to Send (RTS) line.    |
  683.   +-------------+------------------------------------------------------------+
  684.  
  685.  
  686.     Syntax    FUNCTION SioRTS(ByVal Port, ByVal Cmd)
  687.               REM Port : Port selected.
  688.               REM Cmd  : RTS command (SET, CLEAR, or READ)
  689.  
  690.    Remarks    The SioRTS function controls the Request to Send (RTS bit in the
  691.               modem control register.
  692.  
  693.               The  RTS  line  is  used  by  some  error  correcting  modems to
  694.               implement hardware flow control.  RTS is dropped by the computer
  695.               to signal the modem not to send data, and is  raised  to  signal
  696.               the modem to continue. RTS should be set when communicating with
  697.               a modem unless Flow Control is being used.
  698.  
  699.               Refer  to  the  User's  Manual for a discussion of flow control.
  700.               Commands (defined in WSC4VB.BAS) are:
  701.  
  702.               SET_LINE     ASC("S")   - set RTS (ON)
  703.               CLEAR_LINE   ASC("C")   | clear RTS (OFF)
  704.               READ_LINE    ASC("R")   - read RTS
  705.  
  706.    Returns    IE_NOPEN : Port not opened. Call SioReset first.
  707.               IE_BADID : No such port.
  708.               WSC_RANGE: Command is not one of 'S', 'C', or 'R'.
  709.                      0 : RTS is OFF (READ_LINE Command).
  710.                     >0 : RTS is ON  (READ_LINE Command).
  711.  
  712.   See Also    SioFlow and SioDTR.
  713.  
  714.  
  715.  
  716.  
  717.  
  718.   +------------+-------------------------------------------------------------+
  719.   | SioRxClear |  Clears the receive buffer.                                 |
  720.   +------------+-------------------------------------------------------------+
  721.  
  722.  
  723.     Syntax    FUNCTION SioRxClear(ByVal Port)
  724.               REM Port : Port selected.
  725.  
  726.    Remarks    The SioRxClear  function  will  delete  any  characters  in  the
  727.               receive  buffer  for  the  specified port.  After execution, the
  728.               receive buffer will be empty.  Call SioRxClear after resetting a
  729.               port in order to delete any spurious characters.
  730.  
  731.    Returns    IE_NOPEN : Port not opened. Call SioReset first.
  732.               IE_BADID : No such port.
  733.  
  734.   See Also    SioRxQue.
  735.  
  736.  
  737.  
  738.  
  739.  
  740.  
  741.  
  742.  
  743.  
  744.  
  745.  
  746.  
  747.  
  748.  WSC4VB Reference Manual                                                Page 11
  749.   +------------+-------------------------------------------------------------+
  750.   | SioStatus  |  Returns the serial port status.                            |
  751.   +------------+-------------------------------------------------------------+
  752.  
  753.  
  754.     Syntax    FUNCTION SioStatus(ByVal Port,ByVal Mask)
  755.               REM Port : Port selected.
  756.               REM Mask : Error mask.
  757.  
  758.    Remarks     The  SioStatus  function  returns  the serial port error status
  759.               corresponding to the Mask argument.
  760.  
  761.                 WSC_RXOVER  : The receive queue overflowed.
  762.                 WSC_OVERRUN : An  incoming  byte  was  overwritten.
  763.                  WSC_PARITY : A parity error was detected (incoming byte)
  764.                   WSC_FRAME : A framing error was detected (incoming byte)
  765.                   WSC_BREAK : A break signal was detected.
  766.                  WSC_TXFULL : The transmit queue is full.
  767.  
  768.               For example, to test for receive queue overflow:
  769.  
  770.               If SioStatus(Port, WSC_RXOVER) <> 0 Then
  771.                 Print "RX Overflow"
  772.               End if
  773.  
  774.               The  nummerical  values  of  the  mask  constants are defined in
  775.               WSC4VB.BAS.
  776.  
  777.    Returns    IE_NOPEN : Port not opened. Call SioReset first.
  778.               IE_BADID : No such port.
  779.  
  780.  
  781.  
  782.  
  783.   +-------------+------------------------------------------------------------+
  784.   |  SioRxQue   |  Returns the number of bytes in the receive queue.         |
  785.   +-------------+------------------------------------------------------------+
  786.  
  787.  
  788.     Syntax    FUNCTION SioRxQue(ByVal Port)
  789.               REM Port : Port selected.
  790.  
  791.    Remarks    The  SioRxQue  function  will return the number of characters in
  792.               the receive queue at the time of the call. It  can  be  used  to
  793.               implement XON/XOFF flow control.
  794.  
  795.    Returns    IE_NOPEN : Port not opened. Call SioReset first.
  796.               IE_BADID : No such port.
  797.  
  798.   See Also     SioRxFlush.
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  WSC4VB Reference Manual                                                Page 12
  817.   +------------+-------------------------------------------------------------+
  818.   | SioTxClear |  Clears the transmitter buffer.                             |
  819.   +------------+-------------------------------------------------------------+
  820.  
  821.  
  822.     Syntax    FUNCTION SioTxClear(ByVal Port)
  823.               REM Port : Port selected.
  824.  
  825.    Remarks    The SioTxClear  function  will  delete  any  characters  in  the
  826.               transmit  buffer  for the specified port, provided that you will
  827.  
  828.               Once  this  function  is  called,  any character in the transmit
  829.               buffer (put there by SioPutc) will be  lost  and  therefore  not
  830.               transmitted.
  831.  
  832.    Returns    IE_NOPEN : Port not opened. Call SioReset first.
  833.               IE_BADID : No such port.
  834.  
  835.   See Also    SioTxQue & SioTxFlush.
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.   +------------+-------------------------------------------------------------+
  845.   |  SioTxQue  |  Returns the number of bytes in the transmit queue.         |
  846.   +------------+-------------------------------------------------------------+
  847.  
  848.  
  849.     Syntax    FUNCTION SioTxQue(ByVal Port)
  850.               REM Port : Port selected.
  851.  
  852.    Remarks    The SioTxQue function will return the number  of  characters  in
  853.               the  transmit  queue  at the time of the call.
  854.  
  855.    Returns    IE_NOPEN : Port not opened. Call SioReset first.
  856.               IE_BADID : No such port.
  857.  
  858.   See Also     SioTxFlush.
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.  
  866.  
  867.  
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  WSC4VB Reference Manual                                                Page 13
  885.   +------------+-----+-------------------------------------------------------+
  886.   | SioUnGetc  |  "Un|gets" the last character read with SioGetc().          |
  887.   +------------+-----+-------------------------------------------------------+
  888.  
  889.  
  890.     Syntax    FUNCTION SioUnGetc(ByVal Port,ByVal Ch)
  891.               REM Port : Port selected.
  892.               REM Ch   : Character to unget.
  893.  
  894.    Remarks    The SioUnGetc function returns  ("pushes")  the  character  back
  895.               into  the serial input buffer.  The character pushed will be the
  896.               next character returned by SioGetc.  Only one character  can  be
  897.               pushed back. This function works just like the "ungetc" function
  898.               in the C language.
  899.  
  900.    Returns    IE_NOPEN : Port not opened. Call SioReset first.
  901.               IE_BADID : No such port.
  902.  
  903.   See Also    SioReset.
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  WSC4VB Reference Manual                                                Page 14
  953.   Function Summary
  954.  
  955.   Refer  to the WSC4VB Reference Manual (WSC4VB.REF) for detailed information on
  956.   the communications and  support  functions.  A  one  line  summary  of  each
  957.   function follows:
  958.  
  959.   +---------------+-----------------------------------------------------------+
  960.   |  SioBaud      |  Sets the baud rate of the selected port.                 |
  961.   |  SioBrkSig    |  Asserts, cancels, or detects BREAK signal.               |
  962.   |  SioCTS       |  Reads the Clear to Send (CTS) modem status bit.          |
  963.   |  SioDCD       |  Reads the Data Carrier Detect (DCD) modem status bit.    |
  964.   |  SioDone      |  Terminates further serial processing.                    |
  965.   |  SioDSR       |  Reads the Data Set Ready (DSR) modem status bit.         |
  966.   |  SioDTR       |  Set, clear, or read the Data Terminal Ready (DTR) bit.   |
  967.   |  SioFlow      |  Enables / disables hardware flow control.                |
  968.   |  SioGetc      |  Reads the next character from the serial line.           |
  969.   |  SioGets      |  Reads a character string from the serial line.           |
  970.   |  SioInfo      |  Returns information such as library version.             |
  971.   |  SioParms     |  Sets parity, stop bits, and word length.                 |
  972.   |  SioPutc      |  Transmit a character over a serial line.                 |
  973.   |  SioPuts      |  Transmit a character string over a serial line.          |
  974.   |  SioReset     |  Initialize a serial port for processing.                 |
  975.   |  SioRI        |  Reads the Ring Indicator (RI) modem status bit.          |
  976.   |  SioRTS       |  Sets, clears, or reads the Request to Send (RTS) line.   |
  977.   |  SioRxClear   |  Clears the receive buffer.                               |
  978.   |  SioRxQue     |  Returns the number of characters in the receive queue.   |
  979.   |  SioStatus    |  Returns the serial line status.                          |
  980.   |  SioTxClear   |  Clears the transmit buffer.                              |
  981.   |  SioTxQue     |  Returns the number of characters in the transmit queue.  |
  982.   |  SioUnGetc    |  "Un-gets" (puts back) a specified character.             |
  983.   +---------------+-----+-----------------------------------------------------+
  984.  
  985.  
  986.   Error Code Summary
  987.  
  988.  
  989.   +---------------+---------------------------------------------+
  990.   |  WSC_NO_DATA  |  No incoming serial data is available.      |
  991.   |  WSC_RANGE    |  A parameter is out of range.               |
  992.   |  WSC_ABORTED  |  The shareware version of WSC has expired.  |
  993.   +---------------+---------------------------------------------+
  994.   |  IE_BADID     |  No such port.                              |
  995.   |  IE_OPEN      |  Port already opened.                       |
  996.   |  IE_NOPEN     |  Port not opened. Call SioReset first.      |
  997.   |  IE_MEMORY    |  Cannot allocate memory for queues.         |
  998.   |  IE_DEFAULT   |  Error in default parameters.               |
  999.   |  IE_HARDWARE  |  Hardware not present.                      |
  1000.   |  IE_BYTESIZE  |  Unsupported byte size.                     |
  1001.   |  IE_BAUDRATE  |  Unsupported baud rate.                     |
  1002.   +---------------+---------------------------------------------+
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010.  
  1011.  
  1012.  
  1013.  
  1014.  
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020.  WSC4VB Reference Manual                                                Page 15
  1021.  
  1022.