简体   繁体   中英

How to find all the network interfaces in windows ce?

In my C# application I need to identify all the network interfaces of my device running on windows ce 6.0.

In dot net full framework I am able to use

NetworkInterface.GetAllNetworkInterfaces();

but I don't see the same namespace and class in compact framework.
I need the code similar to NetworkInterface.GetAllNetworkInterfaces() .

One option could be to run the windows command "netsh" and parse the output:

Command:

netsh interface show interface

Outputs:

Admin State    State          Type             Interface Name
-------------------------------------------------------------------------
Enabled        Connected      Dedicated        Ethernet 1
Enabled        Disconnected   Dedicated        Wi-Fi

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM