home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / NETCALL.ZIP / NETCALL.DOC next >
Encoding:
Text File  |  1989-08-02  |  10.0 KB  |  245 lines

  1.  
  2.                               
  3.                               NETCALL.TPU
  4.                                  v1.0
  5.  
  6.                           (c)1989 Duane Davis
  7.  
  8. What is NETCALL?
  9.  
  10.      NETCAL.TPU is a Turbo Pascal 4.0 unit that simplifies adding LANtastic
  11.   Netbios functions to your programs. This version includes all calls needed
  12.   to determine the Lantastic version, list logins/redirections, perform
  13.   login/logout/redirect, and expand error messages into meaningfull text.
  14.   Future versions may also include printer queue and copy support depending
  15.   on how many people express interest in it.
  16.  
  17. Disclaimer
  18.  
  19.      Although I have spent many hours debugging NETCALL.TPU, and it works
  20.   fine on my system, I cannot guarentee it to work for you and will not be
  21.   help liable for any damages it may cause.
  22.  
  23. Shareware Notice
  24.  
  25.      This program has been distributed under the shareware concept. As such
  26.   you are free to make copies, upload it to BBS', etc. as long as all files
  27.   are distributed with it and without modification. If you do decide to use
  28.   it in one of your programs I ask that you register it by sending $5 to:
  29.  
  30.                              Duane Davis
  31.                        4718 Meridian Ave. #376
  32.                          San Jose, CA 95118
  33.  
  34. Questions, Comments, Suggestions
  35.  
  36.      Any questions, comments or suggestions can be addressed to me either
  37.   by mail, through E-mail on EXEX-PC BBS, or as a comment to sysop on my BBS
  38.   at (408)287-2353.
  39.  
  40.  
  41. Using NETCALL.TPU
  42.  
  43.      NETCALL.TPU must be compiled into your source code in order to use it. 
  44.   All you have to do is add the line "USES NETCALL" following the program
  45.   name declaration. Calling the routines work as if they were an actual
  46.   procedure/function in your code.
  47.  
  48.      Variables marked with a * are supplied by you. All other variables are
  49.   returned by the called routine.
  50.  
  51. -----------------------------------------------------------------------------
  52.   Function Version : String;
  53.  
  54.      Returns the network softwares major and minor version numbers in a
  55.      string. ie. "2.42".
  56. -----------------------------------------------------------------------------
  57.   Function GetError (ErrorNum: Integer) : String;
  58.  
  59.      ErrorNum = Error number to be converted.
  60.  
  61.      Takes an error number and expands it into a text string. See error
  62.      chart listed elsewhere in this file for a list of error numbers and
  63.      text strings. Any error number out of the range of the ones listed
  64.      in the chart will return "Undefined error number".
  65. -----------------------------------------------------------------------------
  66.   Procedure GetDevice( Index  : Integer;
  67.                    Var Name   : String;
  68.                    Var Path   : String;
  69.                    Var Type   : Integer;
  70.                    Var Status : Integer;
  71.                    Var Error  : Integer);
  72.  
  73.    * Index  = Redirection entry index. Index 0 specifies the first entry.
  74.      Name   = Device name (ie. "C:")
  75.      Path   = Path that device is redirected to (ie. "\\SERVER\DRIVE_C")
  76.      Type   = Type of Device (3=Printer, 4=Disk)
  77.      Status = Status of redirection (0=Valid, 1=Invalid)
  78.      Error  = Error number or 0 if no error
  79.  
  80.      Returns information on a redirected device. Error = 18 when Index is
  81.      higher than last entry.
  82. -----------------------------------------------------------------------------
  83.   Procedure NetUse(    Name   : String;
  84.                        Path   : String;
  85.                        Type   : Integer;
  86.                    Var Error  : Integer);
  87.  
  88.    * Name   = Name of device to be redirected (ie. "C:")
  89.    * Path   = Path to redirect to (ie. "\\SERVER\DRIVE_C")
  90.    * Type   = Type of Device (3=Printer, 4=Disk)
  91.      Error  = Error number or 0 if no error
  92.  
  93.      Creates a device redirection. Does the same thing as
  94.      NET USE {Local Drive|Printer} {\\ServerName\Network resource}
  95. -----------------------------------------------------------------------------
  96.   Procedure NetUnuse(  Name   : String;
  97.                    Var Error  : Integer);
  98.  
  99.    * Name   = Name of redirection to cancel (ie. "C:")
  100.      Error  = Error number or 0 if no error
  101.  
  102.      Cancel a device redirection. Does the same thing as
  103.      NET UNUSE {Local Drive|Printer}
  104. -----------------------------------------------------------------------------
  105.   Procedure GetLogins( Index  : Integer;
  106.                    Var Name   : String;
  107.                    Var Error  : Integer);
  108.  
  109.    * Index  = Login entry index. Index 0 specifies the first entry.
  110.      Name   = Computer name logged into
  111.      Error  = Error number or 0 if no error
  112.  
  113.      Get name of servers you are currently logged into. 
  114. -----------------------------------------------------------------------------
  115.   Procedure NetLogin( Server  : String;
  116.                       Name    : String;
  117.                       Paswrd  : String;
  118.                   Var Error   : Integer);
  119.  
  120.    * Server = Name of server to log into (ie. "\\SERVER")
  121.    * Name   = Account name to log into (ie. "Manager)
  122.    * Paswrd = Account password
  123.      Error  = Error number or 0 if no error
  124.  
  125.      Log into an available server. Does the same thing as
  126.      NET LOGIN {ServerName} {AccountName} {Password}.
  127. -----------------------------------------------------------------------------
  128.   Procedure NetLogout(Server  : String;
  129.                   Var Error   : Integer);
  130.  
  131.    * Server = Name of server to log out of (ie. "\\SERVER")
  132.      Error  = Error number or 0 if no error
  133.  
  134.      Log out of a server. Does the same thing as
  135.      NET LOGOUT {ServerName}.
  136. -----------------------------------------------------------------------------
  137.   Procedure GetUser(  Index   : Integer;
  138.                   Var Name    : String;
  139.                   Var Error   : String);
  140.  
  141.    * Index  = Login entry index. Index 0 specifies first entry.
  142.      Name   = Name of user logged in
  143.      Error  = Error number or 0 if no error
  144.  
  145.      Get name of user logged into server.
  146. -----------------------------------------------------------------------------
  147.   Procedure GetServer(Index   : Integer;
  148.                   Var Name    : String;
  149.                   Var Error   : Integer);
  150.  
  151.    * Index  = Available server index. Index 0 specifies first entry.
  152.      Name   = Name of server. Does not include the \\ prefix.
  153.      Error  = Error number or 0 if no error
  154.  
  155.      Get name of server that is available but not currently logged in.
  156. -----------------------------------------------------------------------------
  157.  
  158. ERROR CODES
  159.  
  160.      {Node Name} is replaced with the name of the node. RESERVED errors are
  161.   returned as "General Failure".
  162.  
  163. Error Number      Meaning
  164. ------------      -------
  165.   1    01H     Invalid function number
  166.   2    02H     File not found
  167.   3    03H     Path not found
  168.   4    04H     File open limit has been exceeded or no handles left
  169.   5    05H     Access denied
  170.   6    06H     Invalid handle
  171.   7    07H     Memory control blocks destroyed
  172.   8    08H     The memory limit has been exceeded
  173.   9    09H     Invalid memory block address
  174.  10    0AH     Invalid environment
  175.  11    0BH     Invalid format
  176.  12    0CH     Invalid access code
  177.  13    0DH     Invalid data
  178.  14    0EH     RESERVED
  179.  15    0FH     Invalid drive was specified
  180.  16    10H     Attempt to remove current directory
  181.  17    11H     Not same device
  182.  18    12H     No more files
  183.  19    13H     Attempt to write on write protected disk
  184.  20    14H     Unknown unit
  185.  21    15H     Drive not ready
  186.  22    16H     Unknown command
  187.  23    17H     Data CRC error
  188.  24    18H     Bad req stuc length
  189.  25    19H     Seek error
  190.  26    1AH     Unknown media
  191.  27    1BH     Sector not found
  192.  28    1CH     No paper
  193.  29    1DH     Write fault
  194.  30    1EH     Read fault
  195.  31    1FH     General failure
  196.  32    20H     Sharing violation
  197.  33    21H     Lock violation
  198.  34    22H     Invalid disk change
  199.  35    23H     FCB unavailable
  200.  36    24H     Sharing buffer overflow
  201.  37    25H     RESERVED
  202.  38    26H     Cannot complete file operation
  203.  39-49 27H-31H RESERVED
  204.  50    32H     Network request not supported
  205.  51    33H     Network node {Node Name} is not listening
  206.  52    34H     The name already exists on the network
  207.  53    35H     Cannot locate network name
  208.  54    36H     The network is busy
  209.  55    37H     Server connection to network node {Node Name} broken
  210.  56    38H     The NETBIOS command limit has been exceeded
  211.  57    39H     The network adapter has malfunctioned
  212.  58    3AH     Incorrect response received from network node {Node Name}
  213.  59    3BH     Unexpected network error from network node {Node Name}
  214.  60    3CH     Incompatible network node {Node Name}
  215.  61    3DH     Print queue full on network node {Node Name}
  216.  62    3EH     No room for print file on network node {Node Name}
  217.  63    3FH     The print file has been deleted on network node {Node Name}
  218.  64    40H     The network name has been deleted
  219.  65    41H     You have been denied access on network node {Node Name}
  220.  66    42H     Invalid network device
  221.  67    43H     The network name was not found
  222.  68    44H     The network name limit has been exceeded
  223.  69    45H     The session limit has been exceeded
  224.  70    46H     Network node ? has been temporarily paused
  225.  71    47H     The network request to network node ? was denied
  226.  72    48H     Print or disk redirection is paused on network node {Node Name}
  227.  73    49H     Invalid network version
  228.  74    4AH     Account has expired
  229.  75    4BH     Password has expired
  230.  76    4CH     Login attempt invalid at this time
  231.  77-79 4DH-4FH RESERVED
  232.  80    50H     file already exists
  233.  81    51H     RESERVED
  234.  82    52H     Cannot make directory entry
  235.  83    53H     Failure on critical error
  236.  84    54H     Too many redirections or logins to network node {Node Name}
  237.  85    55H     Duplicate redirection or login to network node {Node Name}
  238.  86    56H     Invalid username or password
  239.  87    57H     Invalid parameter
  240.  88    58H     Network data fault
  241.  89    59H     Function not supported on network
  242.  90    5AH     Required system component not installed
  243.       
  244.       
  245.