探测无线网卡。

The WlanEnumInterfaces function will return the wireless interfaces found on the local computer. If none are found, then you are using the LAN connection.

If a wireless interface is found, it is still possible that the wireless radio is turned off and you can't use the wireless interface until the radio is turned back on.

The reference documentation for the WlanEnumInterfaces function has sample code that you can try.

On Windows XP, you can call the GetIfTable function (See the IP Helper documentation) to get a list of network interfaces on the local computer. However, on Windows XP, the dwType member in the MIB_IFROW structure returned is Ethernet for both a LAN and a wireless LAN interface. The text returned in the bDescr member of the MIB_IFROW can usually be used to determine which interface is the wireless LAN interface. The description text usually contains the 802.11 or WLAN string.

On Windows Vista and later, you can call the GetIfTable function and use the dwType member in the returned MIB_IFROW structure to determine which interface is a wireless LAN (dwType = IF_TYPE_IEEE80211).

The reference documentation for the GetIfTable function has sample code that you can try.

 

http://msdn.microsoft.com/en-us/library/windows/desktop/aa365943(v=vs.85).aspx

http://blog.163.com/ljm1113@126/blog/static/579844522007112091430641/

http://msdn.microsoft.com/en-us/library/windows/hardware/ff559214(v=vs.85).aspx

http://source.winehq.org/source/include/ipifcons.h

http://cr.openjdk.java.net/~khazra/7158636/webrev.01/src/windows/native/java/net/NetworkInterface.c.sdiff.html

http://msdn.microsoft.com/en-us/library/windows/desktop/aa366836(v=vs.85).aspx

http://hi.baidu.com/xicao54007/blog/item/99fa42439d1e330f73f05d85.html

posted @ 2012-05-21 23:02  规格严格-功夫到家  阅读(394)  评论(0编辑  收藏  举报