WlanGetProfile (wlanapi)
Last changed: -38.140.44.50

.
Summary
TODO - a short description

C# Signature:

[DllImport("Wlanapi.dll", SetLastError = true, CharSet = CharSet.Unicode)]
public static extern uint WlanGetProfile(IntPtr hClientHandle,ref Guid pInterfaceGuid,string strProfileName,IntPtr pReserved,ref string pstrProfileXml,ref uint pdwFlags,ref uint pdwGrantedAccess);

VB Signature:

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

User-Defined Types:

None.

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

//Profile list
IntPtr ppProfileList = new IntPtr();
result = WlanGetProfileList(ClientHandle, ref pInterfaceGuid, new IntPtr(), ref ppProfileList);
WLAN_PROFILE_INFO_LIST wlanProfileInfoList = new WLAN_PROFILE_INFO_LIST(ppProfileList);

//Profile description
uint pdwFlags = 0, pdwGrantedAccess = 0;
for (int i = 0; i < wlanProfileInfoList.dwNumberOfItems; i++)
        {
        pdwFlags = 0;
        pdwGrantedAccess = 0;
        string strProfileName = wlanProfileInfoList.ProfileInfo[i].strProfileName, pstrProfileXml = null;
        WlanGetProfile(ClientHandle, ref pInterfaceGuid, strProfileName, new IntPtr(), ref  pstrProfileXml, ref pdwFlags, ref pdwGrantedAccess);
        }

Documentation