WlanAllocateMemory function (wlanapi.h)

The WlanAllocateMemory function allocates memory. Any memory passed to other Native Wifi functions must be allocated with this function.

Syntax

PVOID WlanAllocateMemory(
  [in] DWORD dwMemorySize
);

Parameters

[in] dwMemorySize

Amount of memory being requested, in bytes.

Return value

If the call is successful, the function returns a pointer to the allocated memory.

If the memory could not be allocated for any reason or if the dwMemorySize parameter is 0, the returned pointer is NULL.

An application can call GetLastError to obtain extended error information.

Requirements

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

WlanFreeMemory