The NetApiBufferAllocate function allocates memory from the heap. Use this function only when compatibility with the NetApiBufferFree function is required. Otherwise, use LocalAlloc.
NET_API_STATUS NetApiBufferAllocate(
DWORD ByteCount,
LPVOID *Buffer
);
Windows NT: Requires version 3.1 or later.
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in lmapibuf.h.
Import Library: Use netapi32.lib.
Networking (Net) Overview, Net Functions, NetApiBufferReallocate