InetGetPhysicalAddress Function  
 
BOOL WINAPI InetGetPhysicalAddress(
  LPTSTR lpszAddress,  
  UINT cchAddress  
);

The InetGetPhysicalAddress function returns the MAC address for the local host's Ethernet or Token Ring adapter.

Parameters

lpszAddress
MAC address for the local host's Ethernet or Token Ring adapter.
cchAddress
Maximum number of bytes to be written.

Return Value

If the function succeeds, the return value is non-zero. If the function fails, the return value is zero. To get extended error information, call InetGetLastError.

Requirements

Client: Requires Windows 7, Windows Vista or Windows XP.
Server: Requires Windows Server 2008 or Windows Server 2003.
Header: Include cswsock7.h.
Library: Use cswskav7.lib.
Unicode: Implemented as Unicode and ANSI versions.

See Also

InetEnumNetworkAddresses, InetGetLocalName, InetGetHostAddress, InetFormatAddress