Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

WlanGetProfile (wlanapi)
 
.
Summary
TODO - a short description

C# Signature:

[DllImport("wlanapi.dll", SetLastError = true)]
private static extern uint WlanGetProfile(
    [In] IntPtr clientHandle,
    [In, MarshalAs(UnmanagedType.LPStruct)] Guid interfaceGuid,
    [In, MarshalAs(UnmanagedType.LPWStr)] string profileName,
    [In] IntPtr pReserved,
    [Out, MarshalAs(UnmanagedType.LPWStr)] out string profileXml,
    [In, Out, Optional] ref WlanProfileFlags flags
    [Out, Optional] out WlanProfileAccessFlags pdwGrantedAccess
);
[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 "wlanapi.dll" (TODO) As TODO
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:

WlanGetProfile(ClientHandle, pInterfaceGuid, profileName, IntPtr.Zero, out profileXml, ref flags, out grantedAccess);
//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

Please edit this page!

Do you have...

  • helpful tips or sample code to share for using this API in managed code?
  • corrections to the existing content?
  • variations of the signature you want to share?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions