The NetApiBufferSize function returns the size, in bytes, of the allocated buffer using NetApiBufferAllocate.
NET_API_STATUS NetApiBufferSize(
LPVOID buffer,
DWORD ByteCount
);
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, NetApiBufferFree