WlanFreeMemory function (wlanapi.h)

The WlanFreeMemory function frees memory. Any memory returned from Native Wifi functions must be freed.


void WlanFreeMemory(
  [in] PVOID pMemory


[in] pMemory

Pointer to the memory to be freed.

Return value



If pMemory points to memory that has already been freed, an access violation or heap corruption may occur.

There is a hotfix available for Wireless LAN API for Windows XP with Service Pack 2 (SP2) that can help improve the performance of applications that call WlanFreeMemory and WlanGetAvailableNetworkList many times.


Requirement Value
Minimum supported client Windows Vista, Windows XP with SP3 [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header wlanapi.h (include Wlanapi.h)
Library Wlanapi.lib
DLL Wlanapi.dll
Redistributable Wireless LAN API for Windows XP with SP2

See also