MAPIAllocateBuffer

Applies to: Office 2010 | Outlook 2010 | Visual Studio

Allocates a memory buffer.

Header file:

Mapix.h

Implemented by:

MAPI

Called by:

Client applications and service providers

SCODE MAPIAllocateBuffer(
  ULONG cbSize,
  LPVOID FAR * lppBuffer
);

Parameters

  • cbSize
    [in] Size, in bytes, of the buffer to be allocated.

  • lppBuffer
    [out] Pointer to the returned allocated buffer.

Return Value

  • S_OK
    The call succeeded and has returned the requested memory buffer.

Remarks

During MAPIAllocateBuffer call processing, the calling implementation acquires a block of memory from the operating system. The memory buffer is allocated on an even-numbered byte address. On platforms where long integer access is more efficient, the operating system allocates the buffer on an address whose size in bytes is a multiple of four.

Calling the MAPIFreeBuffer function releases the memory buffer allocated by MAPIAllocateBuffer, by calling the MAPIAllocateMore function and any buffers linked to it, when the memory is no longer needed.

See Also

Reference

MAPIReallocateBuffer