Partager via


IMailSyncCallBack::AllocateMem (Compact 7)

3/12/2014

The AllocateMem method allocates memory for the caller in the Messaging application's address space.

Syntax

HRESULT AllocateMem (
  DWORD cbSize,
  LPBYTE * ppb
);

Parameters

  • cbSize
    [in] Specifies the number of bytes to be allocated.
  • ppb
    [out] Reference to the returned memory.

Return Value

This method returns the standard values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL, as well as the following:

  • S_OK
    Indicates success.

Remarks

AllocateMem must be used whenever the transport needs to allocate memory that is to be passed between the transport and Messaging application - for example, when Messaging is freeing the memory.

Requirements

Header

cemapi.h

Library

cemapi.lib

See Also

Reference

IMailSyncCallBack
IMailSyncCallBack::FreeMem