Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Book 4-Appendices - <b>ppcbuftyp()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 PPCBUFTYP()
 Determines the communication buffer type
------------------------------------------------------------------------------
 Syntax

     PPCBUFTYP(<nHandle>) --> nBufferType

     Netware: 2.2 and 3.11

 Argument

     <nHandle>  Designates the communication buffer.

 Returns

     PPCBUFTYP() returns a type code that indicates the protocol of the
     specified communication buffer.  For all possible types (IPX, SPX,
     NetBIOS Datagram, or NetBIOS session), the header file CTPPC.CH contains
     symbolic constants according to the following table.

     Table 31.4:  Possible Return Values of PPCBUFTYP()
     ------------------------------------------------------------------------
     Value   Sym. Con.    Definition
     ------------------------------------------------------------------------
     1       PPC_IPX      IPX
     17      PPC_SPX      SPX
     2       PPC_NBD      NetBIOS datagram
     18      PPC_NBS      NetBIOS session
     ------------------------------------------------------------------------

     The numeric values might change in future versions, so you should use
     symbolic constants.  If an error occurs (for example, if the handle is
     invalid), the function returns -1.

 Description

     PPCBUFTYP() allows you to develop procedures that can work with any
     communication buffer.  With PPCBUFTYP(), protocol specific calls can be
     made, depending on the buffer type.

 Example

     Determine the destination's name within a session and thereby
     differentiate between SPX and NetBIOS session buffers:

     #include "ctppc.ch"

     IF PPCBUFTYP(nHandle)=PPC_SPX
        ? 'Destination name:',SPXCONTARG(nHandle)
     ELSEIF PPCBUFTYP(nHandle)=PPC_NBS
        ? 'Destination name:',NBSCONTARG(nHandle)
     ELSE
        ? 'Error: No session buffer!'
     ENDIF

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