I need to get the MAC address in a Universal Windows Application. I searched for an equivalent code but I did not succeed. Could someone guide me how to do this?
Ricardo Souza.
I need to get the MAC address in a Universal Windows Application. I searched for an equivalent code but I did not succeed. Could someone guide me how to do this?
Ricardo Souza.
How to Get mac address in Universal Apps?
AFAIK, currently there is no API can get the local machine MAC address directly in UWP app. In Win32 application we use NetworkInterface.GetPhysicalAddress
method which is currently not implemented in UWP. But it seems like it is plan to support UWP, details please reference this issue.
So, temporary for a workaround you may try to use the GetAdaptersAddresses
method of PInvoke
as @ChristophvanderFecht mentioned. For a sample about GetAdaptersAddress
you may reference this thread.