Scalabium Software

SMExport advertising
Knowledge for your independence'.
Home Delphi and C++Builder tips


#88: How do I find a MAC address?

The code below gets your MAC address. Should you have more than one NIC in your machine you will get the MAC off the first one.

function CoCreateGuid(var guid: TGUID): HResult; stdcall; far external 'ole32.dll';

function Get_MACAddress: string;
var
  g: TGUID;
  i: Byte;
begin
  Result := '';
  CoCreateGUID(g);
  for i := 2 to 7 do
    Result := Result + IntToHex(g.D4[i], 2);
end;


Published: July 5, 2000

See also
 
Metafile Convert
SMExport suite
DBISAM Password Recovery
Paradox to MS Access converter
ABA Database Convert
DBExport tools
ABA Spreadsheet Convert
Protected Storage Viewer
Viewer for MS Outlook Messages
DBISAM Viewer
 
 


Contact to webmaster

 

Borland Software Code Gear Scalabium Delphi tips

Copyright© 1998-2024, Scalabium Software. All rights reserved.
webmaster@scalabium.com

SMExport advertising