2017-06-20 46 views
0

在我的C#应用​​程序中,我需要确定在windows ce 6.0上运行的设备的所有网络接口。如何在windows ce中找到所有的网络接口?

在点网完整的框架,我能够使用

NetworkInterface.GetAllNetworkInterfaces(); 

,但我没有看到在紧凑架构相同的命名空间和类。
我需要类似于NetworkInterface.GetAllNetworkInterfaces()的代码。

回答

0

一种选择是运行Windows命令 “netsh的”,并解析输出:

命令:

netsh interface show interface 

输出:

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

当我尝试在执行命令cmd.exe我得到“无法执行netsh.exe” – shivkumar

+0

@shivkumar尝试'wmic nic获得NetConnectionID'。它显示常规连接接口,包括那些已被禁用的接口。 – NtFreX

+0

我收到错误“无法执行wmic.exe” – shivkumar

相关问题