我知道在Windows Phone 7 - 7.5中无法检索WIFI适配器的Mac地址,但在Windows Phone 8中是否可以?如果是这样,怎么样?
答案 0 :(得分:4)
使用此代码:
Microsoft.Phone.Net.NetworkInformation.NetworkInterfaceList InterfacesList = new Microsoft.Phone.Net.NetworkInformation.NetworkInterfaceList();
您可以获取设备中连接的所有接口。
您希望获得每个连接接口的所有信息:
foreach (Microsoft.Phone.Net.NetworkInformation.NetworkInterfaceInfo specificInterface in InterfacesList)
{
if (specificInterface.InterfaceType == Microsoft.Phone.Net.NetworkInformation.NetworkInterfaceType.Wireless80211)
{
Console.WriteLine("This interface is a Wifi Interface :");
}
Console.WriteLine("Bandwidth :" + specificInterface.Bandwidth);
Console.WriteLine("Characteristics :" + specificInterface.Characteristics);
Console.WriteLine("Description :" + specificInterface.Description);
Console.WriteLine("InterfaceName :" + specificInterface.InterfaceName);
Console.WriteLine("InterfaceType :" + specificInterface.InterfaceType);
}
您可以访问MSDN以获取有关NetworkInterfaceInfo
的更多信息但是,它们不是MAC地址信息!你可以使用“描述”,它是网卡的ID ......