Compartilhar via


IMailSyncCallBack::AllocateMem

4/8/2010

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
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Pocket PC 2002 and later, Smartphone 2002 and later

See Also

Reference

IMailSyncCallBack
IMailSyncCallBack::FreeMem

Other Resources

Messaging