home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
lan
/
spoolit
/
getid.inc
next >
Wrap
Text File
|
1987-02-15
|
1KB
|
63 lines
type
ST48 = String[48];
ST3 = string[3];
Procedure getuser(var u: ST48; var STN : ST3);
type
RegPack1 = record
AX,BX,CX,DX,BP,SI,DI,DS,ES,Flags : integer;
end;
RegPack2 = record
AL,AH,BL,BH,CL,CH,DL,DH : Byte;
end;
reqType = packed array [1..7] of Byte;
repType = packed array [1..90] of char;
var
Regs : Regpack1;
Sregs: RegPack2;
req_buffer : reqType;
rep_buffer : reptype;
s: string[63];
i,j: integer;
begin
with Regs do
begin
{ This Code gets the user's logical connection Number }
Sregs.AH:=$DC;
MSDOS(Sregs);
STR(Sregs.AL,STN);
{ This code passes the connection number to the call to obtain
all logged information about a connection }
req_buffer[3]:=$16;
req_buffer[4]:=Sregs.AL;
req_buffer[1]:=$02;
req_buffer[2]:=$00;
AX:=$E300;
DS:= seg(req_buffer);
SI:= ofs(req_buffer);
ES:= seg(rep_buffer);
DI:= ofs(rep_buffer);
MSDOS (Regs);
end;
j:=1;
i:=9;
{ The Object name is in Bytes 9 thru 63 of the reply buffer and is null
padded }
While (I < 63) and (rep_buffer[i] <>chr($00)) do begin
u[j]:=rep_buffer[i];
i:=i+1;
j:=j+1;
end;
u[0]:=chr(j-1);
End; {procedure GetUser}