home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
pascal
/
library
/
dos
/
netz
/
netware
/
netware.pa1
< prev
next >
Wrap
Text File
|
1992-03-02
|
11KB
|
237 lines
{!R! FONT 15; FTMD 15; EXIT;}
{***************************************************************************}
{** Program : NETWARE **}
{***************************************************************************}
{** Version : 1.3 ** Started : 11/11/91 ** Ended : / / **}
{***************************************************************************}
{******************************** Description ******************************}
{***************************************************************************}
{** OOP library for Netware API. **}
{** **}
{** This unit forms the lowest level object : NETWARE **}
{** **}
{** **}
{***************************************************************************}
{******************************** Information ******************************}
{***************************************************************************}
{** This units provides all the interfaces to the network shells and many **}
{** misc routines. **}
{** **}
{** **}
{** **}
{***************************************************************************}
{$I NETWARE.INC}
UNIT NETWARE;
INTERFACE
USES
nwvar;
TYPE
BufferNameType = (Request, Receive);
BufferType = ARRAY [0 .. 520] OF BYTE;
ConnectionIDTableArrayType = ARRAY [1 .. MaxSlotsInShell] OF ConnectionIDTableType;
FileServerNameTableArrayType = ARRAY [1 .. MaxSlotsInShell] OF Byte48ArrayType;
pNetwareOBJ = ^NetwareOBJ;
NetwareOBJ = object
nwRequestBuffer : BufferType;
nwReceiveBuffer : BufferType;
nwReqOffset : WORD;
nwRecOffset : WORD;
CONSTRUCTOR Init;
PROCEDURE GetWrkstnEnv (VAR VersionString);
FUNCTION PrConnRequest (FunctionNumber : BYTE; ConnectionID : WORD) : WORD;
FUNCTION FileServiceRequest (FunctionNumber : BYTE; VAR RequestBuffer; RequestBufferLength : WORD;
VAR ReceiveBuffer; ReceiveBufferLength : WORD) : WORD;
FUNCTION ServerReq (ServerNumber : WORD; FunctionNumber, SubFunctionNumber : BYTE) : WORD;
PROCEDURE ServerRequest (ServerNumber : WORD; FunctionNumber, SubFunctionNumber : BYTE);
FUNCTION ShellRequest (FunctionNumber : BYTE; VAR RequestBuffer, ReceiveBuffer) : WORD;
FUNCTION TableReq (FunctionNumber, SubFunctionNumber : BYTE; VAR TableAddr) : WORD;
FUNCTION NCPRequest (FunctionNumber : BYTE; RequestBufferLength : WORD; VAR RequestBuffer;
ReceiveBufferLength : WORD; VAR ReceiveBuffer) : WORD;
FUNCTION NCPConnRequest (ConnectionID : WORD; FunctionNumber : BYTE; RequestBufferLength : WORD;
VAR RequestBuffer; ReceiveBufferLength : WORD; VAR ReceiveBuffer) : WORD;
FUNCTION ClrRelReq (FunctionNumber : BYTE; VAR Name) : WORD;
PROCEDURE SetClearReq (FunctionNumber : BYTE);
FUNCTION PhysRecReq (FunctionNumber : BYTE; Handle : WORD; ROffSet : LONGINT; RLength : LONGINT;
Directive : BYTE; TimeOut : WORD) : WORD;
FUNCTION SemaphorReq (FunctionNumber : BYTE; Handle : LONGINT; TimeOut : WORD) : WORD;
FUNCTION LockReq (FunctionNumber, Mode : BYTE; TimeOut : WORD) : WORD;
FUNCTION LogReq (FunctionNumber : BYTE; VAR LogName; Directive : BYTE; TimeOut : WORD) : WORD;
FUNCTION LPTCapReq (FunctionNumber, Device : BYTE) : WORD;
FUNCTION PrnSrvRequest (FunctionNumber : BYTE; BufferSize : WORD; VAR ReceiveBuffer;
PrinterDevice : BYTE) : WORD;
FUNCTION PrCapRequest (FunctionNumber, SubFunctionNumber : BYTE) : WORD;
PROCEDURE GetConnectionIDTable;
PROCEDURE GetDriveConnectionID;
PROCEDURE GetDriveFlagTable;
PROCEDURE GetDriveHandleTable;
PROCEDURE GetFileServerNameTable;
FUNCTION ScanShellTable (FileServerAddress : ServerAddressType) : WORD;
FUNCTION GetFirstFreeSlotInShell : WORD;
PROCEDURE PutFileServerInShell (ConnectionID : WORD);
FUNCTION NextOrderNumberInShell : WORD;
PROCEDURE SortShell (AddServerToShell : BOOLEAN);
PROCEDURE AddFileServerToShell (ConnectionID : WORD; AddServerToShell : BOOLEAN;
FileServerAddress : ServerAddressType);
PROCEDURE RemoveFileServerFromShell (ConnectionID : WORD; ClearShell : BOOLEAN);
PROCEDURE AddToFileServerNameTable (ConnectionID : WORD; ServerName : ObjectNameType);
{MISC FUNCTIONS}
FUNCTION UpperCaseNW (InputString : STRING) : STRING;
PROCEDURE InitRequestBuffer;
PROCEDURE InitReceiveBuffer;
PROCEDURE AddByte (ByteValue : BYTE);
PROCEDURE AddWord (WordValue : WORD);
PROCEDURE AddWordSwap (WordValue : WORD);
PROCEDURE AddLong (LongValue : LONGINT);
PROCEDURE AddLongSwap (LongValue : LONGINT);
PROCEDURE AddArray (VAR Buffer; BufferLength : WORD);
PROCEDURE AddString (InputString : STRING; Start : BYTE);
PROCEDURE AddChar (CharValue : CHAR);
PROCEDURE AddFiller (BufferLength : WORD);
PROCEDURE AddTotal (BufferName : BufferNameType);
PROCEDURE GetByte (VAR Buffer; Location : WORD);
PROCEDURE GetWord (VAR Buffer; Location : WORD);
PROCEDURE GetWordSwap (VAR Buffer; Location : WORD);
PROCEDURE GetLong (VAR Buffer; Location : WORD);
PROCEDURE GetLongSwap (VAR Buffer; Location : WORD);
PROCEDURE GetArray (VAR Buffer; Location, BufferLength : WORD);
PROCEDURE GetString (VAR Buffer; Location, BufferLength : WORD);
FUNCTION GetTotal (BufferName : BufferNameType) : WORD;
PROCEDURE SetTotal (BufferName : BufferNameType; Total : WORD);
PROCEDURE SetStart (Start : WORD);
PROCEDURE DoWordSwap (BufferName : BufferNameType; Location : WORD);
PROCEDURE DoLongSwap (BufferName : BufferNameType; Location : WORD);
PROCEDURE DoMoveArray (BufferName : BufferNameType; Source, Destination,
BufferLength : WORD);
FUNCTION WordSwap (InputWord : WORD) : WORD;
FUNCTION LongSwap (InputLong : LONGINT) : LONGINT;
FUNCTION CheckNetwareVersion (MinimumVersion, MinimumSubVersion, MinimumRevision,
MinimumSFT, MinimumTTS : WORD) : WORD;
FUNCTION ReturnNetwareVersion (VAR MinimumVersion, MinimumSubVersion, MinimumRevision,
MinimumSFT, MinimumTTS : WORD) : WORD;
FUNCTION IsV3Supported (ConnectionID : WORD) : WORD;
FUNCTION IsV22Supported (ConnectionID : WORD) : WORD;
FUNCTION GetSearchOrderFromDriveLetter (Path : PathNameType; DriveLetter : CHAR) : WORD;
FUNCTION GetFileServerAddress (ServerName : ObjectNameType;
VAR FileServerAddress : ServerAddressType) : BOOLEAN;
PROCEDURE ConvertNetworkNumber (NetworkNumber : Byte4ArrayType; VAR OutputString : String8Type);
PROCEDURE ConvertNodeAddress (NodeAddress : Byte6ArrayType; VAR OutputString : String12Type);
FUNCTION HexString (InputLong : LONGINT; Places : BYTE) : STRING;
FUNCTION PtrOfs (InPointer : POINTER; ArrayNum, ArraySize : WORD) : POINTER;
PROCEDURE SwapAsciiZ (InPPtr, InAPtr : POINTER; Len : BYTE; ToPascal : BOOLEAN);
PROCEDURE PtToAsciiZ (InPointer, Outpointer : POINTER; Len : BYTE);
FUNCTION LengthAsciiZ (VAR Buffer) : WORD;
FUNCTION AsciiZToStr (VAR Buffer; Max, StartPosition : WORD) : STRING;
PROCEDURE StrToAsciiZ (InputString : STRING; VAR OutputAsciiZ);
FUNCTION IntToStr (InputNumber : LONGINT) : STRING;
FUNCTION GetOriginalLetter (OldDirectoryHandle : BYTE; ConnectionID : WORD;
VAR DriveLetter : CHAR) : WORD;
FUNCTION ValidateDots (Path : PathNameType) : BOOLEAN;
FUNCTION _NWMapWildPath (Path : PathNameType; VAR OutPath : PathNameType) : BYTE;
DESTRUCTOR Done; VIRTUAL;
END;
VAR
FileServerNameTable : ARRAY [1 .. MaxSlotsInShell] OF ObjectNameType;
ServerConnectionIDTable : ARRAY [1 .. MaxSlotsInShell] OF ServerIDTableType;
ConnectionIDTablePtr : ^ConnectionIDTableArrayType;
FileServerNameTablePtr : ^FileServerNameTableArrayType;
DriveConnectionTablePtr : ^Byte32ArrayType;
DriveFlagTablePtr : ^Byte32ArrayType;
DriveHandleTablePtr : ^Byte32ArrayType;