home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / QBAS / QBWNET10.ZIP / NETCOMM.DOC < prev    next >
Text File  |  1993-06-22  |  12KB  |  319 lines

  1.  
  2. INTRODUCTION
  3.  
  4.  
  5.         QBWARE/Net is a standard network library for Basic that will provide
  6.         a standard API to network services offered by IPX, SPX and NetBios.
  7.         The shareware release supports ONLY IPX at this time.  This library
  8.         of functions supports Microsoft Basic PDS and Microsoft
  9.         Quickbasic v4.5.
  10.  
  11. LICENSE INFORMATION
  12.  
  13.           All versions of the QBWARE/Net library,  are not public
  14.           domain software, nor are they free software. 
  15.            
  16.           QBWARE/Net is copyright (C) 1991, 1993 by AJM Software
  17.            
  18.           Non-registered users are granted a limited license to use  QBWARE/Net
  19.           on a trial  basis for the  purpose of  determining whether it  is
  20.           suitable for their needs.  Use of QBWARE/Net, except for this limited
  21.           purpose,  requires registration.  Use of non-registered copies of
  22.           QBWARE/Net by any person,  business, corporation, governmental agency
  23.           or other entity institution is strictly forbidden. 
  24.            
  25.           Registration  permits  a  user  the license to use QBWARE/Net for
  26.           development purposes, only on a single computer.   QBWARE/Net can be
  27.           included into any  program and distributed  in library form  only
  28.           without  royalty. A  registered user  may  use the  program on  a
  29.           different computer, but may not use  the program on more than one
  30.           computer at the same time. 
  31.  
  32.           All users are granted a limited license to copy QBWARE/Net only for
  33.           the trial  use of  others subject to  the above  limitations, and
  34.           also the following: 
  35.            
  36.                QBWARE/Net must be copied in unmodified form, complete with
  37.                the file containing this license information.
  38.            
  39.                The full QBWARE/Net documentation must be included with  the
  40.                copy. 
  41.            
  42.                No  fee, charge  or other  compensation may  be  accepted or
  43.                requested  by any  licensee, except  a handling  fee not  to
  44.                exceed $10.00.
  45.            
  46.                QBWARE/Net may  not be distributed in conjunction with any
  47.                other product.
  48.            
  49.                The ASSEMBLY source code for QBWARE/Net may NOT be distributed
  50.                under any circumstances. 
  51.  
  52.                Operators of electronic bulletin  board systems (Sysops) may
  53.                post QBWARE/Net for downloading by their users only as long as
  54.                the above conditions are met. 
  55.            
  56.                Distributors of public domain or user supported  software,
  57.                other than operators of electronic bulletin board  systems,
  58.                may distribute copies of QBWARE/Net  subject  to  the  above
  59.                conditions only after obtaining written permission  from AJM
  60.                Software. 
  61.  
  62. WARRANTY
  63.  
  64.           AJM Software makes  no warranty of any kind,  express or implied,
  65.           including without limitation,  any warranties of  merchantability
  66.           and/or fitness for a particular  purpose.  AJM Software shall not
  67.           be liable for any damages,  whether direct, indirect, special  or
  68.           consequential arising  from a failure of this  program to operate
  69.           in the  manner desired by  the user.   AJM Software shall  not be
  70.           liable for  any damage to  data or  property which may  be caused
  71.           directly or indirectly by use of the program. 
  72.            
  73.           IN NO  EVENT WILL AJM Software BE LIABLE  TO YOU FOR ANY DAMAGES,
  74.           INCLUDING  ANY LOST PROFITS, LOST  SAVINGS OR OTHER INCIDENTAL OR
  75.           CONSEQUENTIAL DAMAGES ARISING OUT OF YOUR USE OR INABILITY TO USE
  76.           THE PROGRAM, OR FOR ANY CLAIM BY ANY OTHER PARTY.
  77.  
  78. REGISTRATION
  79.  
  80.  
  81.     Remit to:                     AJM Software                     Order Form 
  82.                                  40200 Pinetree
  83.                               Plymouth, MI 48170-4513
  84.  
  85.     Please send: 
  86.  
  87.     ____ QBWARE/Net Disk (Evaluation only) ......... @ $ 10.00 ea  $ ______
  88.          (includes all routines and manual on disk)
  89.  
  90.     ____ QBWARE/Net Registration ................... @ $ 49.00 ea  $ ______
  91.          (includes QBWARE/Net distribution disk)
  92.                                                          Subtotal    ______ 
  93.  
  94.                                                C.O.D. Fee ($5.00)    ______
  95.  
  96.                      Shipping and Handling (Outside of U.S. only)    ______
  97.  
  98.                                                              Total $ ______ 
  99.  
  100.     Payment by:   ( ) Check   ( ) C.O.D. [NO CREDIT CARDS]
  101.  
  102.        Name: ____________________________________________________________ 
  103.  
  104.     Company: ____________________________________________________________ 
  105.  
  106.     Address: ____________________________________________________________ 
  107.  
  108.            : ____________________________________________________________ 
  109.  
  110.            : ____________________________________________________________ 
  111.  
  112.     Day Phone: _________________________ Eve: ___________________________ 
  113.  
  114.  
  115.  
  116.     ORDERS OUTSIDE THE US: Please include an additional $10.00 to cover 
  117.     additional postage and handling costs.  No C.O.D.'s will be accepted 
  118.     on orders delivered outside the US. 
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128. OVERVIEW
  129.  
  130.         The QBWARE/Net libraryy allows you to develop code in Basic or
  131.         Quickbasic that can run in an IPX/SPX or NetBios environment
  132.         without change.  The library contains the following FUNCTIONs.
  133.  
  134.  
  135.             NetStart%
  136.             NetCall%
  137.             NetListen&
  138.             NetSend%
  139.             NetReceive%
  140.             NetConverse%
  141.             NetBroadcast%
  142.             NetHangUp%
  143.             NetStop%
  144.             NetLastError%
  145.  
  146.         These FUNCTIONs can be used to establish peer-to-peer communications
  147.         with other workstations on a Local Area Network.
  148.  
  149.  
  150. USAGE
  151.  
  152.         NOTE THAT YOU MUST USE THE /O OPTION WHEN COMPILING PROGRAMS USING
  153.         QBWARE/Net.
  154.  
  155.         The library contains the following files:
  156.  
  157.         NETWORK.BI   This file should be included in your program using
  158.  
  159.                          REM $INCLUDE: 'NETWORK.BI'
  160.  
  161.                      It contains PROTOTYPE statements for each function as
  162.                      well as TYPE declarations for the data structures by
  163.                      the library.
  164.  
  165.         IPXLIBxx.OBJ This file should be linked with your application
  166.                      program.  It contains the high-level interface to
  167.                      the IPX routines used to communicate across the
  168.                      network.  There are language dependent versions of
  169.                      this file IPXLIBBC.OBJ is used for BASIC PDS v7.1 and
  170.                      IPXLIBQB.OBJ is to be used with Quickbasic v4.5.
  171.  
  172.         NETWORK.LIB  This file contains the low-level protocol specific
  173.                      routines used to communicate across the network.
  174.  
  175.         PILEBC.BAT   Sample compile batch job for BASIC PDS v7.1.  It is
  176.                      included for illustration purposes.  If you elect to
  177.                      use this batch file to compile your programs, please
  178.                      modify the pathnames to fit your development
  179.                      environment.
  180.  
  181.         PILEQB.BAT   Sample compile batch job for Quickbasic.  It is
  182.                      included for illustration purposes.  If you elect to
  183.                      use this batch file to compile your programs, please
  184.                      modify the pathnames to fit your development
  185.                      environment.
  186.  
  187.  
  188. FUNCTIONS
  189.  
  190.         DECLARE FUNCTION NetStart% (St AS NetStation)
  191.  
  192.         NetStart initializes all Network communications buffers and
  193.         determines how many concurrent requests can be handled.  The
  194.         NDSessions variable contains the number of concurrent requests.
  195.         It should be initialized before calling NetStart.  If not
  196.         specified, it defaults to 12.  Each session requires about
  197.         600 bytes of storage.  Your local workstation ID is returned
  198.         in the variable St.
  199.  
  200.  
  201.  
  202.  
  203.         DECLARE FUNCTION NetCall% (Target AS NetStation)
  204.  
  205.         NetCall establishes communications with another station on the
  206.         network.  In a connectionless environment like IPX, this call
  207.         is meaningless and always returns 0.  It should be used, however,
  208.         to insure compatibility with connection-oriented services like
  209.         NetBios and SPX.  The Target must be the network name of the
  210.         machine that you are trying to establish a connection to.
  211.  
  212.  
  213.  
  214.  
  215.         DECLARE FUNCTION NetListen& ()
  216.  
  217.         NetListen starts a listen session and enables your workstation to
  218.         receive messages from other stations on the network.  You cannot
  219.         receive messages unless you first issue a NetListen.  This should
  220.         generally be the first thing your program does after calling
  221.         NetStart.  If you expect to receive more than one message at a
  222.         time or communicate with more than one station at a time, you
  223.         should issue multiple NetListen calls.  Each time you execute
  224.         this call, one session is permanently reserved.  Because of this,
  225.         you should never execute this call more than the number in NDSession
  226.         less 4.  In other words, do not execute NetListen more than
  227.         NDSession - 4 times.
  228.  
  229.  
  230.  
  231.  
  232.  
  233.         DECLARE FUNCTION NetSend% (Target AS NetStation, Message AS NetMsg)
  234.  
  235.         NetSend sends a message to the target station.  Note that the Message
  236.         cannot exceed 512 characters.
  237.  
  238.  
  239.  
  240.  
  241.  
  242.         DECLARE FUNCTION NetReceive% (Source AS NetStation, Message AS NetMsg)
  243.  
  244.         NetReceive checks to see if any Network messages have been received.
  245.         If a message is received, the sending station is returned in Source.
  246.         You should regularly call NetReceive if you expect to receive messages
  247.         from many stations.
  248.  
  249.  
  250.  
  251.  
  252.  
  253.         DECLARE FUNCTION NetConverse% (Target AS NetStation, SendMsg AS NetMsg, RecvMsg AS NetMsg)
  254.  
  255.         NetConverse send a message to the target station and waits up to 5
  256.         seconds for a response.  In a connectionless service like IPX, this
  257.         service sends a message and waits for the next response from anyone.
  258.         It should not be used if you are expecting message from multiple
  259.         stations.  The NDTimeOut& parameter can be used to vary the timeout
  260.         length.
  261.  
  262.  
  263.  
  264.  
  265.  
  266.         DECLARE FUNCTION NetBroadcast% (NetHandle AS Long, Message AS NetMsg)
  267.  
  268.         NetBroadcast sends a message to anyone on the network who is
  269.         listening.  A broadcast will generally work only on the local
  270.         network and usually does not cross a bridge.  In the IPX
  271.         implementation, you can initialize NDNetNum$ to the appropriate
  272.         network number before making this call and the broadcast will
  273.         be routed to that network.
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.         DECLARE FUNCTION NetHangUp% (Target AS NetStation)
  281.  
  282.         NetHangUp terminates the connection between your workstation
  283.         and the target station.  In a connectionless service like IPX,
  284.         this call is for compatibility only but should always be used
  285.         to insure compatibility with the connection-oriented services
  286.         like SPX and NetBios.
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.         DECLARE FUNCTION NetStop% ()
  294.  
  295.         NetStop frees up the communication buffers and control blocks.
  296.         These areas are then returned to Basic for its use.
  297.  
  298.  
  299.  
  300.  
  301.  
  302.         DECLARE FUNCTION NetLastError% ()
  303.  
  304.         This function returns the extended error code after a call
  305.         fails.  Anytime a FUNCTION returns a -1, call NetLastError
  306.         to determine a more detailed cause for the failure.
  307.  
  308.         Possible values are:
  309.  
  310.             IPX implementation
  311.  
  312.                  249    ECB cannot be cancelled
  313.                  250    Destination node not found
  314.                  254    Socket Table is full
  315.                  255    Socket is already open
  316.                         Listening Socket does not exist
  317.                         ECB is not in use
  318.  
  319.