简体   繁体   English

Windows CE中可用的网络

[英]network availabitily in windows ce

如何将小型应用程序开发到Windows CE,以使用C#了解设备中的网络可用性

( i am copying my answer to a similar question here ) (我在这里复制对类似问题的回答)

Look in the registry key HKLM\\system\\state\\connections , there is are entries for each of the possible network types, for instance: 在注册表项HKLM\\system\\state\\connections中查找,每种可能的网络类型都有相应的条目,例如:

When connected to a wireless network: 连接到无线网络时:

[HKLM\system\state\Connections\Network]
Adapters="BCMSDDHD1"
Count=dword:00000001
Descriptions="Business World"

when connected to activesync: 连接到activesync时:

[HKLM\system\state\Connections\Desktop]
Adapters=""
Count=dword:00000001
Descriptions="CurrentDTPTNetwork"

The Count value under HKLM\\system\\state\\connections gives you the total number of active connections. HKLM\\system\\state\\connections下的Count值为您提供活动连接的总数。

In HKLM\\system\\state\\Hardware you can find the current power state of the various devices. HKLM\\system\\state\\Hardware您可以找到各种设备的当前电源状态。

Use HttpWebRequest , and try connecting to Google: 使用HttpWebRequest ,然后尝试连接到Google:

http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest(v=VS.80).aspx http://msdn.microsoft.com/zh-cn/library/system.net.httpwebrequest(v=VS.80).aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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