LanIdentifier 類別

定義

代表特定 NetworkAdapter 物件的實體識別資料。 如需示範如何擷取 LanIdentifier 物件所代表之資料的程式碼範例,請參閱 如何擷取網路介面卡和位置資訊, (XAML)

public ref class LanIdentifier sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class LanIdentifier final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class LanIdentifier
Public NotInheritable Class LanIdentifier
繼承
Object Platform::Object IInspectable LanIdentifier
屬性

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

範例

如何 (XAML) 擷取網路介面卡和位置資訊

備註

如果網路介面卡媒體類型為無線區域網路,則位置資料會以 BSSID 表示,如果網路介面卡類型為乙太網路,則會以 < 埠號碼 > 表示。 資料會根據 LLDP 通訊協定來表示。

屬性

InfrastructureId

取得 LanIdentifierData 物件,其中包含網路介面卡連線的位置識別資訊。

NetworkAdapterId

取得配接器 GUID ,識別要與位置資訊相關聯的網路介面卡。

PortId

會取得 LanIdentifierData 物件,其中包含乙太網路類型網路介面卡之連結層探索通訊協定 (LLDP) 位置資訊。

適用於