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 | |
|
); |