[DllImport("Wlanapi.dll",SetLastError=true)]
public static extern uint WlanScan(IntPtr hClientHandle,ref Guid pInterfaceGuid,IntPtr pDot11Ssid,IntPtr pIeData,IntPtr pReserved);
<DllImport("Wlanapi.dll", SetLastError:=True)>
Public Shared Function WlanScan(ByVal hClientHandle As IntPtr, ByRef pInterfaceGuid As Guid, ByVal pDot11Ssid As IntPtr, ByVal pIeData As IntPtr, ByVal pReserved As IntPtr) As UInteger
End Function
pDot11Ssid : Pointer to a DOT11_SSID structure.
pIeData : Pointer to a WLAN_RAW_DATA structure.
Do you know one? Please contribute it!
This method just tells the interface to start doing a scan. If you want to get results as they come back, you have to register a callback function. An easier way is to call this method, wait a while, then use WlanGetAvailableNetworkList
Please add some!
C#
Guid g;
//wlanHndl is the handle returned previously by calling [WlanOpenHandle]
for (int i = 0; i < infoList.dwNumberOfItems; i++)
{
g = infoList.InterfaceInfo[i].InterfaceGuid;
uint resultCode = WlanScan(wlanHndl, ref g, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
if (resultCode != 0)
return;
}