Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
4/8/2010

The MAPIAllocateMorefunction allocates a memory buffer that is linked to another buffer previously allocated with the MAPIAllocateBufferfunction.

Syntax

SCODE MAPIAllocateMore(
  ULONG 
cbSize,
  LPVOID 
lpObject, 
  LPVOID FAR * 
lppBuffer 
);

Parameters

cbSize

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

lpObject

[in] Pointer to an existing MAPI buffer allocated using MAPIAllocateBuffer.

lppBuffer

[out] Pointer to the returned, newly allocated buffer.

Return Value

S_OK

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

Remarks

During MAPIAllocateMorecall 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.

The only way to release a buffer allocated with MAPIAllocateMoreis to pass the buffer pointer specified in the lpObjectparameter to the MAPIFreeBufferfunction. The link between the memory buffers allocated with MAPIAllocateBufferand MAPIAllocateMoreenables MAPIFreeBufferto release both buffers with a single call.

Requirements

Header mapix.h
Library cemapi.lib
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Pocket PC 2002 and later, Smartphone 2002 and later

See Also

Reference

MAPI Functions

Other Resources

Messaging