Ejemplo n.º 1
0
 internal InterfaceInfoEx(WLAN_INTERFACE_INFO info, WLAN_CONNECTION_ATTRIBUTES attributes) : base(info)
 {
     ConnectionMode        = (ConnectionMode)attributes.wlanConnectionMode;
     ProfileName           = attributes.strProfileName;
     AssociationAttributes = new AssociationAttributes(attributes.wlanAssociationAttributes);
     SecurityAttributes    = new SecurityAttributes(attributes.wlanSecurityAttributes);
 }
Ejemplo n.º 2
0
        public static uint GetSignalQuality(Guid gg)
        {
            WLAN_OPCODE_VALUE_TYPE pOpcodeValueType;
            uint   dwSize = 0;
            IntPtr ppData = IntPtr.Zero;

            if (WlanQueryInterface(m_pClientHandle, ref gg, WLAN_INTF_OPCODE.wlan_intf_opcode_current_connection, IntPtr.Zero, out dwSize, out ppData, out pOpcodeValueType) != 0)
            {
                m_errorMessage = "Failed WlanQueryInterface() - Current Connection Attributes";
                return(0);
            }
            if (ppData != IntPtr.Zero)
            {
                WLAN_CONNECTION_ATTRIBUTES connectionAttributes = new WLAN_CONNECTION_ATTRIBUTES(ppData);
                return(connectionAttributes.wlanAssociationAttributes.wlanSignalQuality);
            }
            return(0);
        }