[DllImport("Wlanapi.dll",SetLastError=true)]
public static extern uint WlanScan(IntPtr hClientHandle,ref Guid pInterfaceGuid,IntPtr pDot11Ssid,IntPtr pIeData,IntPtr pReserved);
Declare Function WlanScan Lib "wlanapi.dll" (TODO) As TODO
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!
Guid g;
IntPtr ptr = new IntPtr();
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;
}
WlanFreeMemory(ptr);