Dec 152017
 
NETCALL is a TP 4+ unit that simplifies adding LANtastic Netbios functions to your programs. This version includes all calls needed to determine the Lantastic version, list logins/redirections, perform login/logout/redirec
File NETCALL.ZIP from The Programmer’s Corner in
Category Network Files
NETCALL is a TP 4+ unit that simplifies adding LANtastic Netbios functions to your programs. This version includes all calls needed to determine the Lantastic version, list logins/redirections, perform login/logout/redirec
File Name File Size Zip Size Zip Type
NETCALL.DOC 10207 3081 deflated
NETCALL.TPU 4560 1681 deflated

Download File NETCALL.ZIP Here

Contents of the NETCALL.DOC file




NETCALL.TPU
v1.0

(c)1989 Duane Davis

What is NETCALL?

NETCAL.TPU is a Turbo Pascal 4.0 unit that simplifies adding LANtastic
Netbios functions to your programs. This version includes all calls needed
to determine the Lantastic version, list logins/redirections, perform
login/logout/redirect, and expand error messages into meaningfull text.
Future versions may also include printer queue and copy support depending
on how many people express interest in it.

Disclaimer

Although I have spent many hours debugging NETCALL.TPU, and it works
fine on my system, I cannot guarentee it to work for you and will not be
help liable for any damages it may cause.

Shareware Notice

This program has been distributed under the shareware concept. As such
you are free to make copies, upload it to BBS', etc. as long as all files
are distributed with it and without modification. If you do decide to use
it in one of your programs I ask that you register it by sending $5 to:

Duane Davis
4718 Meridian Ave. #376
San Jose, CA 95118

Questions, Comments, Suggestions

Any questions, comments or suggestions can be addressed to me either
by mail, through E-mail on EXEX-PC BBS, or as a comment to sysop on my BBS
at (408)287-2353.


Using NETCALL.TPU

NETCALL.TPU must be compiled into your source code in order to use it.
All you have to do is add the line "USES NETCALL" following the program
name declaration. Calling the routines work as if they were an actual
procedure/function in your code.

Variables marked with a * are supplied by you. All other variables are
returned by the called routine.

-----------------------------------------------------------------------------
Function Version : String;

Returns the network softwares major and minor version numbers in a
string. ie. "2.42".
-----------------------------------------------------------------------------
Function GetError (ErrorNum: Integer) : String;

ErrorNum = Error number to be converted.

Takes an error number and expands it into a text string. See error
chart listed elsewhere in this file for a list of error numbers and
text strings. Any error number out of the range of the ones listed
in the chart will return "Undefined error number".
-----------------------------------------------------------------------------
Procedure GetDevice( Index : Integer;
Var Name : String;
Var Path : String;
Var Type : Integer;
Var Status : Integer;
Var Error : Integer);

* Index = Redirection entry index. Index 0 specifies the first entry.
Name = Device name (ie. "C:")
Path = Path that device is redirected to (ie. "\\SERVER\DRIVE_C")
Type = Type of Device (3=Printer, 4=Disk)
Status = Status of redirection (0=Valid, 1=Invalid)
Error = Error number or 0 if no error

Returns information on a redirected device. Error = 18 when Index is
higher than last entry.
-----------------------------------------------------------------------------
Procedure NetUse( Name : String;
Path : String;
Type : Integer;
Var Error : Integer);

* Name = Name of device to be redirected (ie. "C:")
* Path = Path to redirect to (ie. "\\SERVER\DRIVE_C")
* Type = Type of Device (3=Printer, 4=Disk)
Error = Error number or 0 if no error

Creates a device redirection. Does the same thing as
NET USE {Local Drive|Printer} {\\ServerName\Network resource}
-----------------------------------------------------------------------------
Procedure NetUnuse( Name : String;
Var Error : Integer);

* Name = Name of redirection to cancel (ie. "C:")
Error = Error number or 0 if no error

Cancel a device redirection. Does the same thing as
NET UNUSE {Local Drive|Printer}
-----------------------------------------------------------------------------
Procedure GetLogins( Index : Integer;
Var Name : String;
Var Error : Integer);

* Index = Login entry index. Index 0 specifies the first entry.
Name = Computer name logged into
Error = Error number or 0 if no error

Get name of servers you are currently logged into.
-----------------------------------------------------------------------------
Procedure NetLogin( Server : String;
Name : String;
Paswrd : String;
Var Error : Integer);

* Server = Name of server to log into (ie. "\\SERVER")
* Name = Account name to log into (ie. "Manager)
* Paswrd = Account password
Error = Error number or 0 if no error

Log into an available server. Does the same thing as
NET LOGIN {ServerName} {AccountName} {Password}.
-----------------------------------------------------------------------------
Procedure NetLogout(Server : String;
Var Error : Integer);

* Server = Name of server to log out of (ie. "\\SERVER")
Error = Error number or 0 if no error

Log out of a server. Does the same thing as
NET LOGOUT {ServerName}.
-----------------------------------------------------------------------------
Procedure GetUser( Index : Integer;
Var Name : String;
Var Error : String);

* Index = Login entry index. Index 0 specifies first entry.
Name = Name of user logged in
Error = Error number or 0 if no error

Get name of user logged into server.
-----------------------------------------------------------------------------
Procedure GetServer(Index : Integer;
Var Name : String;
Var Error : Integer);

* Index = Available server index. Index 0 specifies first entry.
Name = Name of server. Does not include the \\ prefix.
Error = Error number or 0 if no error

Get name of server that is available but not currently logged in.
-----------------------------------------------------------------------------

ERROR CODES

{Node Name} is replaced with the name of the node. RESERVED errors are
returned as "General Failure".

Error Number Meaning
------------ -------
1 01H Invalid function number
2 02H File not found
3 03H Path not found
4 04H File open limit has been exceeded or no handles left
5 05H Access denied
6 06H Invalid handle
7 07H Memory control blocks destroyed
8 08H The memory limit has been exceeded
9 09H Invalid memory block address
10 0AH Invalid environment
11 0BH Invalid format
12 0CH Invalid access code
13 0DH Invalid data
14 0EH RESERVED
15 0FH Invalid drive was specified
16 10H Attempt to remove current directory
17 11H Not same device
18 12H No more files
19 13H Attempt to write on write protected disk
20 14H Unknown unit
21 15H Drive not ready
22 16H Unknown command
23 17H Data CRC error
24 18H Bad req stuc length
25 19H Seek error
26 1AH Unknown media
27 1BH Sector not found
28 1CH No paper
29 1DH Write fault
30 1EH Read fault
31 1FH General failure
32 20H Sharing violation
33 21H Lock violation
34 22H Invalid disk change
35 23H FCB unavailable
36 24H Sharing buffer overflow
37 25H RESERVED
38 26H Cannot complete file operation
39-49 27H-31H RESERVED
50 32H Network request not supported
51 33H Network node {Node Name} is not listening
52 34H The name already exists on the network
53 35H Cannot locate network name
54 36H The network is busy
55 37H Server connection to network node {Node Name} broken
56 38H The NETBIOS command limit has been exceeded
57 39H The network adapter has malfunctioned
58 3AH Incorrect response received from network node {Node Name}
59 3BH Unexpected network error from network node {Node Name}
60 3CH Incompatible network node {Node Name}
61 3DH Print queue full on network node {Node Name}
62 3EH No room for print file on network node {Node Name}
63 3FH The print file has been deleted on network node {Node Name}
64 40H The network name has been deleted
65 41H You have been denied access on network node {Node Name}
66 42H Invalid network device
67 43H The network name was not found
68 44H The network name limit has been exceeded
69 45H The session limit has been exceeded
70 46H Network node ? has been temporarily paused
71 47H The network request to network node ? was denied
72 48H Print or disk redirection is paused on network node {Node Name}
73 49H Invalid network version
74 4AH Account has expired
75 4BH Password has expired
76 4CH Login attempt invalid at this time
77-79 4DH-4FH RESERVED
80 50H file already exists
81 51H RESERVED
82 52H Cannot make directory entry
83 53H Failure on critical error
84 54H Too many redirections or logins to network node {Node Name}
85 55H Duplicate redirection or login to network node {Node Name}
86 56H Invalid username or password
87 57H Invalid parameter
88 58H Network data fault
89 59H Function not supported on network
90 5AH Required system component not installed




 December 15, 2017  Add comments

Leave a Reply