标签:style blog color io ar for div sp cti
public static bool IsHNetCfgWayConnected(string opName) { NetSharingManagerClass netSharingMgr = new NetSharingManagerClass(); INetSharingEveryConnectionCollection connections = netSharingMgr.EnumEveryConnection; List<object> conns = new List<object>(); foreach (INetConnection connection in connections) { INetConnectionProps connProps = netSharingMgr.get_NetConnectionProps(connection); if (connProps.MediaType == tagNETCON_MEDIATYPE.NCM_LAN) { if (connProps.Name.Equals(opName)) { return connProps.Status == tagNETCON_STATUS.NCS_CONNECTED; } } } return false; }
标签:style blog color io ar for div sp cti
原文地址:http://www.cnblogs.com/yomho/p/3965616.html