p;
}
Memo1.Lines.Add(Format(''Lana %x = %s'', [L_Enum.Lana[i], NbGetMacAd
dr(i)]));
end;
Button1.Caption := ''Stop'';
end;
end.
——————————————————————————————————-
unit Nb;
{$F+}
{ nb.pas
16/32 bit windows netbios access (follows IBM''s Netbios 3.0 spec)
(C) CEVI VZW - 29 april 1998 -- DH (Danny.Heijl@cevi.be) --
You can (ab)use this code as you like, but please do not remove the
credits.
I used reference material from IBM, Microsoft, Syntax and Byte when
I wrote
the 16-bit (DOS) c-version ages ago (in Borland Turbo C 2.0 on a 38
6SX PC)
with a Syntax SMB server running on Interactive Unix.
I now converted this to 16 and 32 bit Delphi code.
}
interface
uses SysUtils, Winprocs, Wintypes;
const
{ size of a netbios name }
NBNAMESIZE = 16;
{ max number of network adapters }
{ remeber it''s BIG Blue, right ? }
MAXLANAS = 254;
{ NCB Command codes }
NCB_ASYNC = $80; { asynch command bit to be or-ed into command
}
NCB_CALL = $10; { open a session }
NCB_LISTEN = $11; { wait for a call }
NCB_HANGUP = $12; { end session }
NCB_SEND = $14; { send data }
NCB_RECV = $15; { receive data }
NCB_RECVANY = $16; { receive data on any session }
NCB_CHAINSEND = $17; { chain send data }
NCB_DGSEND = $20; { send a datagram }
NCB_DGRECV = $21; { receive datagram }
NCB_DGSENDBC = $22; { send broadcast datagram }
NCB_DGREVCBC = $23; { receive broadcast datagram }
NCB_ADDNAME = $30; { add unique name to local table }
NCB_DELNAME = $31; { delete name from local table }
NCB_RESET = $32; { reset adapter }
NCB_ADPSTAT = $33; { adapter status }
NCB_SSTAT = $34; { session status }
NCB_CANCEL = $35; { cancel NCB request }
NCB_ADDGRPNAME= $36; { add group name to local table }
NCB_ENUM &nb