Category : Pascal Source Code
Archive   : NOVAPI.ZIP
Filename : NOVAPI.PAS

 
Output of file : NOVAPI.PAS contained in archive : NOVAPI.ZIP
{============================}
{ Novell Netware Application }
{ Programming Interface Unit }
{ Richard Casey }
{ CIS 72247,151 }
{============================}

{===========================================================================

Types:
None

Procedures:
None

Functions:

NovellLogicalID Returns logical id (or station number)
NovellPhysicalID Returns physical network address
NovellLogonName Returns logon name (or ?????)

===========================================================================}

unit NovAPI;

interface

uses dos;

function NovellLogicalID : byte;
inline($B4/$DC/ {MOV AH,DC}
$CD/$21); {INT 21}

function NovellPhysicalID : word;
inline($B4/$EE/ {MOV AH,EE}
$CD/$21); {INT 21}

function NovellLogonName : string;

implementation

function NovellLogonName : string;
var
i : integer;
tmp : string;
r : Registers;
RequestPacket : record
PacketLength : word;
LogFunction : byte;
Connection : byte;
end;
ReplyPacket : record
ReturnLength : word;
UniqueID : longint;
ReturnType : word;
ObjectName : array[1..48] of char;
LogTime : array[1..8] of byte;
end;
begin
RequestPacket.PacketLength:=2;
RequestPacket.LogFunction:=22;
RequestPacket.Connection:=NovellLogicalID;
ReplyPacket.ReturnLength:=64;
with r do begin
DS:=seg(RequestPacket);
SI:=ofs(RequestPacket);
ES:=seg(ReplyPacket);
DI:=ofs(ReplyPacket);
AH:=$E3;
end;
MsDOS(r);
tmp:='?????';
if r.AL=0 then begin
i:=1;
while (ReplyPacket.ObjectName[i]<>#0) and (i<48) do inc(i);
move(ReplyPacket.ObjectName[1],tmp[1],i);
tmp[0]:=char(i);
end;
NovellLogonName:=tmp;
end;

end.


  3 Responses to “Category : Pascal Source Code
Archive   : NOVAPI.ZIP
Filename : NOVAPI.PAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/