Return to Snippet

Revision: 29650
at August 2, 2010 18:16 by icebob


Initial Code
function GetMACAddress: string;
var
 AdapterList: TLanaEnum; 
 NCB: TNCB; 
begin 
 FillChar(NCB, SizeOf(NCB), 0); 
 NCB.ncb_command := Char(NCBENUM); 
 NCB.ncb_buffer := @AdapterList; 
 NCB.ncb_length := SizeOf(AdapterList); 
 Netbios(@NCB); 
 if Byte(AdapterList.length) > 0 then
   Result := GetAdapterInfo(AdapterList.lana[0]) 
 else 
   Result := 'mac not found'; 
end;

Initial URL

                                

Initial Description

                                

Initial Title
Get computer MAC address

Initial Tags

                                

Initial Language
Delphi