// wlanihv.h
DOT11EXT_ALLOCATE_BUFFER Dot11extAllocateBuffer;
DWORD Dot11extAllocateBuffer(
[in] DWORD dwByteCount,
[out] LPVOID *ppvBuffer
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
Important The Native 802.11 Wireless LAN interface is deprecated in Windows 10 and later. Please use the WLAN Device Driver Interface (WDI) instead. For more information about WDI, see WLAN Universal Windows driver model.
The IHV Extensions DLL calls the Dot11ExtAllocateBuffer function to allocate memory for variable-length buffers.
dwByteCount [in]Size, in bytes, of the buffer to allocate.
ppvBuffer [out]A pointer to a caller-supplied variable that stores the address of the allocated buffer. The ppvBuffer parameter has a valid non-null value if the return value is ERROR_SUCCESS.
The call returns an ERROR_xxxx code defined in Winerror.h. The following ERROR_xxxx codes are commonly returned by the Dot11ExtAllocateBuffer function.
| Return code | Description |
|---|---|
| ERROR_SUCCESS | The call succeeded without an error. |
| ERROR_OUTOFMEMORY | The operating system was unable to allocate the memory due to a lack of resources. |
The IHV Extensions DLL must follow these guidelines when calling the Dot11ExtAllocateBuffer function.
The IHV Extensions DLL must call this function when returning any variable-length buffer from an IHV Handler function. In this situation, the operating system is responsible for freeing the buffer after the return of the IHV Handler function.
For more information about the IHV Handler functions, see Native 802.11 IHV Handler Functions.
The IHV Extensions DLL might call this function to allocate memory referenced by the DLL itself.
In this situation, the DLL must free the memory buffer by calling Dot11ExtFreeBuffer.
Native 802.11 IHV Handler Functions
Dot11ExtIhvCreateDiscoveryProfiles