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>nbdopen()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 NBDOPEN()
 Opens the NetBIOS datagram sending and receiving buffer
------------------------------------------------------------------------------
 Syntax

     NBDOPEN(<cSourceName>,[<nRecBuffer>],[<nSendBuffer>],
        [<cTargetName>],[<nPacket>]) --> nHandle

     Netware: 2.2 and 3.11

 Arguments

     <cSourceName>  Designates the NetBIOS name of the communication's
     transmitting side.

     <nRecBuffer>  Designates the selected size of the receiving buffer.
     If no value is passed for <nRecBuffer>, no receiving buffer is
     established.  The minimum size of the receiving buffer is <nPacket>.  If
     the value for <nRecBuffer> is too small, it is changed automatically by
     NBDOPEN().  The maximum size of the receiving buffer is 64 KByte.

     <nSendBuffer>  Designates the selected size of the send buffer.  If
     no value is passed for <nSendBuffer>, no sending buffer is established.
     The minimum size of the sending buffer is <nPacket>.  If the value for
     <nSendBuffer> is too small, it is changed automatically by NBDOPEN().
     The maximum size of the sending buffer is 64 KByte.

     <cTargetName>  Designates a NetBIOS name that specifies the target
     station(s).

     <nPacket>  Designates the packet size of the data that is sent in
     bytes.  The packet size can be between 1 and 512 bytes.  Values outside
     this range are changed automatically.  The default value is 512 Bytes.

 Returns

     If an operation is successful, NBDOPEN() returns a communication handle.
     The return value contains a numeric value that is greater than 0.  You
     should store the handle in a variable because all further operations
     that refer to an established buffer require a communication handle.  If
     an error occurs, the function returns 0.

 Description

     NBDOPEN() allows you to establish a communication buffer for an NetBIOS
     datagram communication with other workstations in the network.  The
     communication buffer can contain the sending and receiving buffer
     through which data is processed.

     <nSourceName> is the NetBIOS name of the process that transmits the data
     (see the Introduction to this chapter).  The name can be added to the
     local name table with the functions NBADDNAME() or NBADDGROUP() before
     the call of NBDOPEN().  If <nSourceName> has not been added to the name
     table, it is added by NBDOPEN() automatically.  If the parameter
     <nTargetName> is passed, only data that is addressed to <cSourceName> is
     received.

     The parameters <nRecBuffer> and <nSendBuffer> determine the size of the
     receiving and sending buffer.  The buffers are automatically designed
     for one NetBIOS packet.  Each buffer can be up to 64 KByte.  However,
     the size of the buffer that is allocated by NBDOPEN() depends on the
     application and the configuration of the computer used.

     The parameter <cTargetName> is optional.  It controls the type of
     datagrams that are sent.  If <cTargetName> has been passed, the data
     that is sent can be received by all workstations on which the name table
     contains <cTargetName> (see the Introduction to this chapter).  If
     <cTargetName> is the name of a station, the data is sent to only one
     station.  If <cTargetName> contains a group name, the data can be
     received by any number of stations.  If <cTargetName> has not been
     passed, NBDOPEN() transmits "broadcast datagrams".  Broadcast datagrams
     do not contain a target address and can be received by all stations that
     wait for broadcast datagrams.

     <nPacket> determines the maximum size of the data range of the NetBIOS
     packets that are sent or received.  The maximum value (and the default
     value) is 512 bytes.  Smaller packets can be sent without failure, but
     larger packets are discarded.  The value of <nPacket> is also valid for
     use in sending data.

 Note

     .  The NetBIOS datagram communication is not based on a
        connection.  There is no guarantee or verification of a successful
        delivery to the target workstation.  The implementation of specific
        protocols with the aid of CA-Clipper Tools functions can be
        necessary.

 Examples

     .  Open the 5 KByte NetBIOS datagram receiving buffer for source
        name MICK:

        nHandle=NBDOPEN("MICK",5120)
        IF nHandle=0
           ? 'Buffer could not be established!'
        ENDIF

     .  Open the 2 KByte NetBIOS datagram sending buffer for source
        name MICK.  The target address is the NetBIOS name KEITH:

        nHandle=IPXOPEN("MICK",,2048,"KEITH")

     .  Open the 1 KByte NetBIOS sending and receiving buffer.  For
        the source and target address, see the example above:

        nHandle=NBDOPEN(,1024,1024,"KEITH")

See Also: PPCCANCEL() PPCREAD() PPCWRITE()

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