NetApiBufferReallocate function (lmapibuf.h)

The NetApiBufferReallocate function changes the size of a buffer allocated by a previous call to the NetApiBufferAllocate function.

Syntax

NET_API_STATUS NET_API_FUNCTION NetApiBufferReallocate(
  [in]  _Frees_ptr_opt_ LPVOID OldBuffer,
  [in]  DWORD                  NewByteCount,
  [out] LPVOID                 *NewBuffer
);

Parameters

[in] OldBuffer

Pointer to the buffer returned by a call to the NetApiBufferAllocate function.

[in] NewByteCount

Specifies the new size of the buffer, in bytes.

[out] NewBuffer

Receives the pointer to the reallocated buffer.

Return value

If the function succeeds, the return value is NERR_Success.

If the function fails, the return value is a system error code. For a list of error codes, see System Error Codes.

Remarks

No special group membership is required to successfully execute the ApiBuffer functions.

For a code sample that demonstrates how to use the network management ApiBuffer functions, see NetApiBufferAllocate.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header lmapibuf.h (include Lm.h)
Library Netapi32.lib
DLL Netapi32.dll

See also

Api Buffer Functions

NetApiBufferAllocate

NetApiBufferFree

Network Management Functions

Network Management Overview