home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C!T ROM 2
/
ctrom_ii_b.zip
/
ctrom_ii_b
/
PROGRAM
/
PASCAL
/
TPNOVA12
/
NOVTP.DOC
< prev
Wrap
Text File
|
1990-06-27
|
20KB
|
378 lines
Turbo Pascal, Novell API Library
'Lantic Software
Version 1.2 - 6/27/90
These routines were developed under Turbo Pascal version 5.x and Novell
Advanced Netware version 2.12. Testing under Netware 386 has shown that all
functions except the server status requests appear to work.
It is recommended that you purchase the "Novell API Reference" from
Novell. These may help in understanding the API.
A fully functional version is available from 'Lantic software for
$75. This includes the latest version or the TPU, IPX/SPX functions TPU,
and more detailed documentation.
'Lantic software
3823 Swanhouse Court
Burtonsville, MD 20866
(301) 572-3972
Dave Olson
User ID : 73307,412
*****************************************************************************
To access these primitives, include the statement :
uses NovAPI;
at the top of your program or in the interface section of your units.
Function prototypes as they appear in the NovAPI unit:
(*BINDERY*)
procedure AddObjectToSet(WhichObject : string47; WhatType : integer;
WhichProperty : string15;
NewMemberName : string47; NewMemberType : integer);
procedure ChangeObjectPassword(WhichObject : string47; WhatType : integer;
OldPassword, NewPassword : string127);
procedure ChangeObjectSecurity(WhichObject : string47; WhatType : integer;
NewSecurity : byte);
procedure ChangePropertySecurity(WhichObject : string47; WhatType : integer;
WhichProperty : string15; NewSecurity : byte);
procedure CloseBindery;
procedure CreateObject(NewObject : string47; NewType : integer;
ObjectFlag,ObjectSecurity : byte);
procedure CreateProperty(WhichObject : string47; WhatType : integer;
NewProperty : string15; NewFlags,NewSecurity : byte);
procedure DeleteObject(WhichObject : string47; WhatType : integer);
procedure DeleteObjectFromSet(WhichObject : string47; WhatType : integer;
WhichProperty : string15;
MemberName : string47; MemberType : integer);
procedure DeleteProperty(WhichObject : string47; WhatType : integer;
NewProperty : string15);
procedure GetBinderyAccessLevel(var SecurityAccessLevel : byte);
procedure GetObjectID(WhichObject : string47; WhatType : integer;
var ObjectID : longint);
procedure GetObjectName(WhichObjectID : longint;
var ObjectName : string47; ObjectType : integer);
function IsObjectInSet(WhichObject : string47; WhatType : integer;
WhichProperty : string15;
MemberName : string47; MemberType : integer) : boolean;
procedure OpenBindery;
procedure ReadPropertyValue(WhichObject : string47; WhatType : integer;
WhichProperty : string15; SegmentNumber : integer;
var Property;
var PropertyFlags : byte;
var MoreSegments : boolean);
procedure RenameObject(WhichObject : string47; WhatType : integer;
NewName : string47);
procedure ScanObject(ScanMask : string47; ScanType : integer;
var LastSeen : longint;
var FoundName : string47;
var FoundType : integer;
var FoundID : longint;
var FoundFlag : byte;
var FoundSecurity : byte;
var FoundHasProperties : boolean);
procedure ScanProperty(WhichObject : string47; WhatType : integer;
ScanMask : string15;
var LastSeen : longint;
var FoundName : string15;
var FoundFlags : byte;
var FoundSecurity : byte;
var FoundHasValue : boolean;
var MoreProperties : boolean);
procedure VerifyObjectPassword(WhichObject : string47; WhatType : integer;
Password : string127);
procedure WritePropertyValue(WhichObject : string47; WhatType : integer;
WhichProperty : string15; var PropertyValue;
SegmentNumber : integer; MoreSegments : boolean);
(*CONNECTION*)
procedure AttachToFileServer(ConnectionID : byte);
function ConnectionNumber : integer;
procedure DetachFromFileServer(ConnectionID : byte);
procedure EnterLoginArea(NumberOfLocalDrives : byte;
LoginSubdirectory : string);
procedure GetConnectionInformation(WhichConnection : integer;
var ObjectID : longint;
var ObjectType : integer;
var ObjectName : string47;
var ObjectLogin : NetworkTimeRecord);
procedure GetInternetAddress(ConnectionNumber : integer;
var ConnectionAddress : InternetworkAddress);
procedure GetObjectConnectionNumbers(WhichObject : string47; WhatType : integer;
ConnectionList : string100);
procedure LoginToFileServer(WhichObject : string47; WhatType : integer;
Password : string27);
procedure LogOut;
procedure LogOutFromFileServer(ConnectionID : integer);
(*DIRECTORY*)
procedure AddTrusteeToDirectory(WhichObjectID : longint;
DirectoryHandle : integer; Directory : string;
RightsMask : byte);
procedure AllocPermanentDirectoryHandle(CurrentHandle : byte;
Directory : string; DriveLetter : char;
var NewHandle, EffectiveRights : byte);
procedure AllocSpecialTemporaryDirectoryHandle(CurrentHandle : byte;
Directory : string; DriveLetter : char;
var NewHandle, EffectiveRights : byte);
procedure AllocTemporaryDirectoryHandle(CurrentHandle : byte;
Directory : string; DriveLetter : char;
var NewHandle, EffectiveRights : byte);
procedure CreateDirectory(NewDirectory : string; NewDirectoryHandle : byte;
MaximumRights : byte);
procedure DeallocateDirectoryHandle(DirectoryHandle : byte);
procedure DeleteDirectory(Directory : string; DirectoryHandle : byte);
procedure DeleteTrusteeFromDirectory(WhichObjectID : longint;
DirectoryHandle : integer;
Directory : string);
procedure GetDirectoryHandle(Drive : char;
var DirectoryHandle, StatusFlag : byte);
procedure GetDirectoryPath(DirectoryHandle : byte;
var Directory : string);
procedure GetDriveFlagTable(var DrvFlagTable : pointer);
procedure GetDriveHandleTable(var DrvHandleTable : pointer);
procedure GetEffectiveDirectoryRights(Directory : string; DirHandle : byte;
var EffectiveRights : byte);
procedure GetVolumeName(VolumeNumber : byte; var VolumeName : string15);
procedure ModifyMaximumRightsMask(Directory : string; DirHandle : byte;
RevokeRights, GrantRights : byte);
procedure RenameDirectory(Directory : string; DirHandle : byte;
NewDirectory : string);
procedure ScanDirectoryForTrustees(Directory : string; DirHandle : byte;
var SequenceNumber : byte;
var FoundDirectory : string16;
var OwnerID : longint;
var CreationDate : longint;
var FiveTrustees : TrusteeIDArray;
var FiveRights : TrusteeRightsArray);
procedure ScanDirectoryInfomation(Directory : string; DirHandle : byte;
var SequenceNumber : integer;
var FoundDirectory : string16;
var OwnerID : longint;
var CreationDate : longint;
var MaximumRightsMask: byte);
procedure ScanObjectTrusteePaths(WhichVolume : byte;
WhichObjectID : longint;
var LastSeen : integer;
var TrusteePath : string;
var TrusteeRights : byte);
procedure SetDirectoryHandle(Directory : string;
SourceDirHandle, TargetDirHandle : byte);
procedure SetDirectoryInformation(Directory : string; DirHandle : byte;
NewOwner : longint; NewCreationDate : longint;
MaximumRightsMask : byte);
(*FCONSOLE*)
procedure ClearConnectionNumber(LogicalConnectionNumber : byte);
procedure DisableFileServerLogin;
procedure DownFileServer(OpCode : DownServerCommands);
procedure EnableFileServerLogin;
function FileServerLoginEnabled : boolean;
procedure GetFileServerDateAndTime(var NetworkTime : NetworkTimeRecord);
function LoggedHasConsolePrivileges : boolean;
(*FILE*)
procedure FileServerFileCopy(SourceHandle,DestinationHandle : word;
SourceOffset,DestinationOffset : longint;
BytesToCopy : longint;
var BytesCopied : longint);
procedure GetExtendedFileAttributes(FileName : string; var ExtendedAttributes : byte);
procedure PurgeErasedFiles;
procedure RestoreEraseFile(VolumeName : string16; DirHandle : byte;
var ErasedFilename, RestoredFilename : string);
procedure ScanFileInformation(FileName : string; DirHandle : byte;
SearchAttribute : byte;
var SequenceNumber : integer;
var FoundFile : string13;
var FileAttributes : byte;
var ExtendedAttributes : byte;
var FileSize : longint;
var OwnerID : longint;
var CreationDate : word;
var LastAccessDate : word;
var LastUpdateDate : longint;
var LastArchiveDate : longint);
procedure SetExtendedFileAttributes(Filename : string; ExtendedAttributes : byte);
procedure SetFileInformation(Filename : string; DirHandle : byte;
SearchAttributes : byte;
FileAttributes,ExtendedAttributes : byte;
OwnerID : longint;
CreationDate,LastAccessDate : integer;
LastUpdateDate,LastArchiveDate : longint);
(*LOCKING*)
procedure ClearFile(FileName : string);
procedure ClearFileSet;
procedure ClearLogicalRecord(LogicalRecordName : string99);
procedure ClearLogicalRecordSet;
procedure ClearPhysicalRecord(FileHandle : integer;
RecordOffset, RecordLength : longint);
procedure ClearPhysicalRecordSet;
procedure GetLockMode(var Mode : LockModes);
procedure LockFileSet(TimeOutTics : integer);
procedure LockLogicalRecordSet(TimeOutTics : integer);
procedure LockPhysicalRecordSet(Mode : LockDirectives; TimeOutTics : integer);
procedure LogLogicalRecord(RecordName : string99;
Mode : LogicalLockDirectives; TImeOutTics : integer);
procedure LogPhysicalRecord(FileHandle : word; Mode : LogicalLockDirectives;
RecordStartOffset, RecordLength : longint;
TimeOutTics : integer);
procedure ReleaseFile(FileName : string);
procedure ReleaseFileSet;
procedure ReleaseLogicalRecord(LogicalRecord : string99);
procedure ReleaseLogicalRecordSet;
procedure ReleasePhysicalRecord(FileHandle : word;
RecordStartOffset, RecordLength : longint);
procedure ReleasePhysicalRecordSet;
procedure SetLockMode(NewMode : LockModes);
(*MESSAGING*)
procedure BroadcastToConsole(Message : string60);
procedure CheckPipeStatus(ConnectionList : string100;
var ResultList : string100);
procedure GetBroadcastMessage(BroadcastMessage : string55);
procedure GetBroadcastMode(var Mode : BroadcastModes);
procedure GetPersonalMessage(var WhoSentIt : byte; var Message : string);
procedure LogNetworkMessage(Message : string80);
procedure OpenMessagePipe(DestinationConnections : string100;
var InitialPipeStatus : string100);
procedure SendBroadcastMessage(Message : string55; Connections : string100;
var ResultCodes : string100);
procedure SendPersonalMessage(Message : string126; ConnectionList : string100;
var ResultCodes : string100);
procedure SetBroadcastMode(NewMode : BroadcastModes);
(*PRINTING*)
procedure CancelLPTCapture;
procedure CancelSpecificCapture(Device : LPTNames);
function DefaultLocalPrinter : LPTNames;
procedure EndLPTCapture;
procedure EndSpecificCapture(Device : LPTNames);
procedure FlushLPTCapture;
procedure FlushSpecificCapture(Device : LPTNames);
procedure GetBannerUserName(var BannerUserName : BannerArray);
procedure GetDefaultPrintJobFlags(var Flags : PrintFlagInformation);
procedure GetPrinterStatus(ServerPrinter :byte;
var ServerPrinterStopped,
ServerPrinterOffLine : boolean;
var ServerPrinterFormType : byte);
procedure GetSpecificCaptureFlags(Device : LPTNames;
var Flags : PrintFlagInformation);
function LPTCaptureActive(var QueuingServerConnectionID : integer) : boolean;
procedure SetBannerUserName(BannerName : BannerArray);
procedure SetCapturePrintJob(PrintQueueJobNumber : integer;
Device : LPTNames);
procedure SetCapturePrintQueue(PrintQID : longint; QueuingServerSlotNumber : byte;
Device : LPTNames);
procedure SetDefaultCaptureFlags(var CaptureInfo : CaptureFlags);
procedure SetDefaultLocalPrinter(Device : LPTNames);
procedure SpecifyCaptureFile(Filename : string; DirHandle : byte);
procedure StartLPTCapture;
procedure StartSpecificCapture(Device : LPTNames);
(*SEMAPHORE*)
procedure CloseSemaphore(SemaphoreHandle : longint);
procedure ExamineSemaphore(SemaphoreHandle : longint;
var SemaphoreValue : integer;
var OpenCount : integer);
procedure OpenSemaphore(SemaphoreName : string127; InitialValue : integer;
var SemaphoreHandle : longint; var OpenCount : integer);
procedure SignalSemphore(SemaphoreHandle : longint);
procedure WaitOnSemaphore(SemaphoreHandle : longint; TimeoutLimit : integer);
(*TTS*)
procedure DisableTransactionTracking;
procedure EnableTransactionTracking;
procedure TTSAbortTransaction;
procedure TTSBeginTransaction;
procedure TTSEndTransaction(var ReferenceNumber : longint);
procedure TTSGetApplicationTresholds(var LogicalLockThreshold,
PhysicalLockThreshold : byte);
procedure TTSGetWorkstationThresholds(var LogicalLockThreshold,
PhysicalLockThreshold : byte);
function TTSIsAvailable : boolean;
procedure TTSSetApplicationTresholds(LogicalLockThreshold,
PhysicalLockThreshold : byte);
procedure TTSSetWorkstationThresholds(LogicalLockThreshold,
PhysicalLockThreshold : byte);
procedure TTSTransactionStatus(TransactionReferenceNumber : longint);
(*WORKSTATION*)
function DefaultConnectionID : integer;
procedure EndOfJob(OpCode : WhichJobs);
procedure GetConnectionIDTable(var ShellConnectionTable : ConnectionTablePointer);
procedure GetDriveConnectionIDTable(var DrvConnectionTable : pointer);
procedure GetFileServerNameTable(var ServerNameTable : pointer);
function NumberOfLocalDrives : integer;
function PreferredConnectionID : integer;
function PrimaryConnectionID : integer;
procedure SetEndOfJobStatus(Mode : EndOfJobStatus);
procedure SetErrorMode(Mode : ErrorModes);
procedure SetPreferredConnectionID(PreferredConnection : byte);
procedure SetPrimaryConnectionID(PrimaryConnection : byte);
(*QUEUE*)
procedure CreateQueue(QueueName,QueuePath : string; QueueBase : byte;
var NewQueueID : longint);
procedure DestroyQueue(QueueID : longint);
procedure ReadQueueCurrentStatus(QueueID : longint;
var QueueStatus : byte;
var NumberOfEntries : byte;
var NumberOfServers : byte;
var ServerIDList : IDList;
var ServerStationList : StationList);
procedure SetQueueCurrentStatus(QueueID : longint; QueueStatus : byte);
procedure CreateQueueJob(QueueID : longint; var Job : JobEntryRecord);
procedure CloseAndStartQueueJob(QueueID : longint; JobNumber : integer);
procedure RemoveJobFromQueue(QueueID : longint; JobNumber : integer);
procedure GetJobsQueueEntryFileSize(QueueID : longint;
JobNumber : integer;
var FileSize : longint);
procedure GetListOfQueueJobs(QueueID : longint;
var JobCount : integer;
var Jobs : JobArray);
procedure ReadJobQueueEntry(QueueID : longint; JobNumber : integer;
var Job : JobEntryRecord);
procedure ChangeJobQueueEntry(QueueID : longint;
var Job : JobEntryRecord);
procedure ChangeJobQueuePosition(QueueID : longint; JobNumber : integer;
NewPosition : byte);
(*QUEUE SERVER*)
procedure AttachServerToQueue(QueueID : longint);
procedure DetachServerFromQueue(QueueID : longint);
procedure ServiceQueueJob(QueueID : longint; TargetServiceType : integer;
var Job : JobEntryRecord);
procedure FinishServiceQueueJob(QueueID : longint; JobNumber : integer;
Charge : longint);
procedure AbortServiceQueueJob(QueueID : longint; JobNumber : integer);
procedure ChangeServersRightsToClientsRights(QueueID : longint; JobNumber : integer);
procedure RestoreServersRights;
procedure ReadServerCurrentStatus(QueueID,ServerID : longint;
ServerStation : byte;
var ServerStatus : ServerStatusType);
procedure SetServerCurrentStatus(QueueID : longint;
var ServerStatus : ServerStatusType);