Platform SDK: Exchange Server

DAPIAllocBuffer

The DAPIAllocBuffer function allocates or reallocates a block of memory.

Quick Info

Header file: DAPI.H
Library: DAPI.LIB

LPVOID DAPIAllocBuffer(
  ULONG cbSize,       
  LPVOID pvAllocBase  
);
 

Parameters

cbSize
Input parameter. Specifies the size (in bytes) of the requested memory block.
pvAllocBase
Input/output parameter. Points to the base address for the allocated memory block.

Return Values

NULL
If the memory is not available or pvAllocBase is not a legal allocation base.
A pointer to the allocated block of memory.
The function completed successfully.

Remarks

If pvAllocBase is not NULL, pvAllocBase must point to a memory block that was either previously allocated by DAPIAllocBuffer or returned by another directory function.

You release the allocated memory with a call to DAPIFreeMemory.

See Also

DAPIFreeMemory