/// <summary> /// Retrieves the list of available networks. /// </summary> /// <param name="flags">Controls the type of networks returned.</param> /// <returns>A list of the available networks.</returns> public Wlan.WlanAvailableNetwork[] GetAvailableNetworkList(Wlan.WlanGetAvailableNetworkFlags flags) { IntPtr availNetListPtr; Wlan.ThrowIfError( Wlan.WlanGetAvailableNetworkList(client.clientHandle, info.interfaceGuid, flags, IntPtr.Zero, out availNetListPtr)); try { return(ConvertAvailableNetworkListPtr(availNetListPtr)); } finally { Wlan.WlanFreeMemory(availNetListPtr); } }
public IEnumerable <Wlan.WlanAvailableNetwork> GetAvailableNetworkList(Wlan.WlanGetAvailableNetworkFlags flags) { IntPtr ptr; Wlan.WlanAvailableNetwork[] networkArray; Wlan.ThrowIfError(Wlan.WlanGetAvailableNetworkList(_client.ItsClientHandle, _info.interfaceGuid, flags, IntPtr.Zero, out ptr)); try { networkArray = ConvertAvailableNetworkListPtr(ptr); } finally { Wlan.WlanFreeMemory(ptr); } return(networkArray); }
public static extern int WlanGetAvailableNetworkList([In] IntPtr clientHandle, [MarshalAs(UnmanagedType.LPStruct), In] Guid interfaceGuid, [In] Wlan.WlanGetAvailableNetworkFlags flags, [In, Out] IntPtr reservedPtr, out IntPtr availableNetworkListPtr);
public Wlan.WlanAvailableNetwork[] GetAvailableNetworkList(Wlan.WlanGetAvailableNetworkFlags flags) { return(_wlanInterface.GetAvailableNetworkList(flags)); }