MAPIAllocateBuffer

Send Feedback

The MAPIAllocateBuffer function allocates a memory buffer.

Syntax

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 Values

  • S_OK
    The call succeeded and has returned the expected value or values.

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 and also releases any additional buffers that have been linked to it through the MAPIAllocateMore function.

Requirements

Pocket PC: Pocket PC 2002 and later
Smartphone: Smartphone 2002 and later
OS Versions: Windows CE 3.0 and later
Header: mapix.h
Library: cemapi.lib

See Also

MAPI Functions | Messaging

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.