home *** CD-ROM | disk | FTP | other *** search
/ Troubleshooting Netware Systems / CSTRIAL0196.BIN / attach / pcc / v08n03 / netwrk.exe / NETCALL.ZIP / NETCALL.DOC next >
Text File  |  1989-10-08  |  11KB  |  252 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 EXEC-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 NETCALLx" (x = 4 or 5 depending
  45.   on which version of Pascal you are using) following the program name
  46.   declaration. Calling the routines work as if they were an actual procedure/
  47.   function in your code.
  48.  
  49.      Variables marked with a * are supplied by you. All other variables are
  50.   returned by the called routine.
  51.  
  52. -----------------------------------------------------------------------------
  53.   Function Version : String;
  54.  
  55.      Returns the network softwares major and minor version numbers in a
  56.      string. ie. "2.42".
  57. -----------------------------------------------------------------------------
  58.   Function GetError (ErrorNum: Integer) : String;
  59.  
  60.      ErrorNum = Error number to be converted.
  61.  
  62.      Takes an error number and expands it into a text string. See error
  63.      chart listed elsewhere in this file for a list of error numbers and
  64.      text strings. Any error number out of the range of the ones listed
  65.      in the chart will return "Undefined error number".
  66. -----------------------------------------------------------------------------
  67.   Procedure GetDevice( Index  : Integer;
  68.                    Var Name   : String;
  69.                    Var Path   : String;
  70.                    Var Type   : Integer;
  71.                    Var Status : Integer;
  72.                    Var Error  : Integer);
  73.  
  74.    * Index  = Redirection entry index. Index 0 specifies the first entry.
  75.      Name   = Device name (ie. "C:")
  76.      Path   = Path that device is redirected to (ie. "\\SERVER\DRIVE_C")
  77.      Type   = Type of Device (3=Printer, 4=Disk)
  78.      Status = Status of redirection (0=Valid, 1=Invalid)
  79.      Error  = Error number or 0 if no error
  80.  
  81.      Returns information on a redirected device. Error = 18 when Index is
  82.      higher than last entry.
  83. -----------------------------------------------------------------------------
  84.   Procedure NetUse(    Name   : String;
  85.                        Path   : String;
  86.                        Type   : Integer;
  87.                    Var Error  : Integer);
  88.  
  89.    * Name   = Name of device to be redirected (ie. "C:")
  90.    * Path   = Path to redirect to (ie. "\\SERVER\DRIVE_C")
  91.    * Type   = Type of Device (3=Printer, 4=Disk)
  92.      Error  = Error number or 0 if no error
  93.  
  94.      Creates a device redirection. Does the same thing as
  95.      NET USE {Local Drive|Printer} {\\ServerName\Network resource}
  96. -----------------------------------------------------------------------------
  97.   Procedure NetUnuse(  Name   : String;
  98.                    Var Error  : Integer);
  99.  
  100.    * Name   = Name of redirection to cancel (ie. "C:")
  101.      Error  = Error number or 0 if no error
  102.  
  103.      Cancel a device redirection. Does the same thing as
  104.      NET UNUSE {Local Drive|Printer}
  105. -----------------------------------------------------------------------------
  106.   Procedure GetLogins( Index  : Integer;
  107.                    Var Name   : String;
  108.                    Var Error  : Integer);
  109.  
  110.    * Index  = Login entry index. Index 0 specifies the first entry.
  111.      Name   = Computer name logged into
  112.      Error  = Error number or 0 if no error
  113.  
  114.      Get name of servers you are currently logged into. 
  115. -----------------------------------------------------------------------------
  116.   Procedure NetLogin( Server  : String;
  117.                       Name    : String;
  118.                       Paswrd  : String;
  119.                   Var Error   : Integer);
  120.  
  121.    * Server = Name of server to log into (ie. "\\SERVER")
  122.    * Name   = Account name to log into (ie. "Manager)
  123.    * Paswrd = Account password
  124.      Error  = Error number or 0 if no error
  125.  
  126.      Log into an available server. Does the same thing as
  127.      NET LOGIN {ServerName} {AccountName} {Password}.
  128. -----------------------------------------------------------------------------
  129.   Procedure NetLogout(Server  : String;
  130.                   Var Error   : Integer);
  131.  
  132.    * Server = Name of server to log out of (ie. "\\SERVER")
  133.      Error  = Error number or 0 if no error
  134.  
  135.      Log out of a server. Does the same thing as
  136.      NET LOGOUT {ServerName}.
  137. -----------------------------------------------------------------------------
  138.   Procedure GetUser(  Index   : Integer;
  139.                   Var Name    : String;
  140.                   Var Error   : String);
  141.  
  142.    * Index  = Login entry index. Index 0 specifies first entry.
  143.      Name   = Name of user logged in
  144.      Error  = Error number or 0 if no error
  145.  
  146.      Get name of user logged into server.
  147. -----------------------------------------------------------------------------
  148.   Procedure GetServer(Index   : Integer;
  149.                   Var Name    : String;
  150.                   Var Error   : Integer);
  151.  
  152.    * Index  = Available server index. Index 0 specifies first entry.
  153.      Name   = Name of server. Does not include the \\ prefix.
  154.      Error  = Error number or 0 if no error
  155.  
  156.      Get name of server that is available but not currently logged in.
  157. -----------------------------------------------------------------------------
  158.  
  159. ERROR CODES
  160.  
  161.      {Node Name} is replaced with the name of the node. RESERVED errors are
  162.   returned as "General Failure".
  163.  
  164. Error Number      Meaning
  165. ------------      -------
  166.   1    01H     Invalid function number
  167.   2    02H     File not found
  168.   3    03H     Path not found
  169.   4    04H     File open limit has been exceeded or no handles left
  170.   5    05H     Access denied
  171.   6    06H     Invalid handle
  172.   7    07H     Memory control blocks destroyed
  173.   8    08H     The memory limit has been exceeded
  174.   9    09H     Invalid memory block address
  175.  10    0AH     Invalid environment
  176.  11    0BH     Invalid format
  177.  12    0CH     Invalid access code
  178.  13    0DH     Invalid data
  179.  14    0EH     RESERVED
  180.  15    0FH     Invalid drive was specified
  181.  16    10H     Attempt to remove current directory
  182.  17    11H     Not same device
  183.  18    12H     No more files
  184.  19    13H     Attempt to write on write protected disk
  185.  20    14H     Unknown unit
  186.  21    15H     Drive not ready
  187.  22    16H     Unknown command
  188.  23    17H     Data CRC error
  189.  24    18H     Bad req stuc length
  190.  25    19H     Seek error
  191.  26    1AH     Unknown media
  192.  27    1BH     Sector not found
  193.  28    1CH     No paper
  194.  29    1DH     Write fault
  195.  30    1EH     Read fault
  196.  31    1FH     General failure
  197.  32    20H     Sharing violation
  198.  33    21H     Lock violation
  199.  34    22H     Invalid disk change
  200.  35    23H     FCB unavailable
  201.  36    24H     Sharing buffer overflow
  202.  37    25H     RESERVED
  203.  38    26H     Cannot complete file operation
  204.  39-49 27H-31H RESERVED
  205.  50    32H     Network request not supported
  206.  51    33H     Network node {Node Name} is not listening
  207.  52    34H     The name already exists on the network
  208.  53    35H     Cannot locate network name
  209.  54    36H     The network is busy
  210.  55    37H     Server connection to network node {Node Name} broken
  211.  56    38H     The NETBIOS command limit has been exceeded
  212.  57    39H     The network adapter has malfunctioned
  213.  58    3AH     Incorrect response received from network node {Node Name}
  214.  59    3BH     Unexpected network error from network node {Node Name}
  215.  60    3CH     Incompatible network node {Node Name}
  216.  61    3DH     Print queue full on network node {Node Name}
  217.  62    3EH     No room for print file on network node {Node Name}
  218.  63    3FH     The print file has been deleted on network node {Node Name}
  219.  64    40H     The network name has been deleted
  220.  65    41H     You have been denied access on network node {Node Name}
  221.  66    42H     Invalid network device
  222.  67    43H     The network name was not found
  223.  68    44H     The network name limit has been exceeded
  224.  69    45H     The session limit has been exceeded
  225.  70    46H     Network node ? has been temporarily paused
  226.  71    47H     The network request to network node ? was denied
  227.  72    48H     Print or disk redirection is paused on network node {Node Name}
  228.  73    49H     Invalid network version
  229.  74    4AH     Account has expired
  230.  75    4BH     Password has expired
  231.  76    4CH     Login attempt invalid at this time
  232.  77-79 4DH-4FH RESERVED
  233.  80    50H     file already exists
  234.  81    51H     RESERVED
  235.  82    52H     Cannot make directory entry
  236.  83    53H     Failure on critical error
  237.  84    54H     Too many redirections or logins to network node {Node Name}
  238.  85    55H     Duplicate redirection or login to network node {Node Name}
  239.  86    56H     Invalid username or password
  240.  87    57H     Invalid parameter
  241.  88    58H     Network data fault
  242.  89    59H     Function not supported on network
  243.  90    5AH     Required system component not installed
  244. -----------------------------------------------------------------------------
  245.  
  246. REVISIONS
  247.  
  248.    08/01/89  Released version 1.0
  249.    10/08/89  Added Unit for Turbo Pascal v5.0      
  250.                  NETCALL4.TPU is for TP v4.0
  251.                  NETCALL5.TPU is for TP v5.0
  252.