WlanGetProfileList (wlanapi)
Last changed: -38.140.44.50

.
Summary
TODO - a short description

C# Signature:

[DllImport("wlanapi.dll", SetLastError = true, CallingConvention=CallingConvention.Winapi)]
private static extern uint WlanGetProfileList(
    [In] IntPtr clientHandle,
    [In, MarshalAs(UnmanagedType.LPStruct)] Guid interfaceGuid,
    [In] IntPtr pReserved,
    [Out] out IntPtr profileList
);

VB Signature:

Declare Function WlanGetProfileList Lib "wlanapi.dll" (TODO) As TODO

User-Defined Types:

WLAN_PROFILE_INFO_LIST

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

On Windows 7, this function returns 87 (ERROR_INVALID_PARAMETER) even if your parameters are correct when wireless is disabled. Wireless must be enable in order for that function to return success.

Tips & Tricks:

Please add some!

Sample Code:

IntPtr ppProfileList;
WlanGetProfileList(ClientHandle, pInterfaceGuid, IntPtr.Zero, out ppProfileList);
WLAN_PROFILE_INFO_LIST wlanProfileInfoList = new WLAN_PROFILE_INFO_LIST(ppProfileList);
WlanFreeMemory(ppProfileList);

Documentation