Welcome to the new DelphiDabbler Code Library Documentation.

This is a new site that's currently running on alpha code. There are going to be bugs. If you discover any, please report them on the site's issues page (GitHub account required). Thanks.

Warning: Many URLs are going to change. Refer to the README file to discover which library project's documentation has been completed.

MACAddress class function

Project: System Information Unit.

Unit: PJSysInfo.

Class: TPJComputerInfo

Applies to: ~>5.0

class function MACAddress: string;

Description

Returns the address of the first network card found in the host computer. The empty string is returned if no network card is detected.

If no network card is active then the MAC Address will not be detected. Furthermore NETBIOS must be enabled for TCP on the network card.

Microsoft notes that NETBIOS is not available Windows Vista and later, however tests show the method works on Vista SP1 with NETBIOS enabled.

Microsoft also note that this method of detecting MAC addresses may not work reliably on Windows 95, 98 and Me.

Use with care