Platform SDK: SMTP Server Events

IMailMsgProperties::MapContent

[This is preliminary documentation and subject to change.]

Maps the content of the MailMsg object to a pointer.

HRESULT MapContent(
  [in] BOOL fWrite,
  [in] BYTE** ppbContent,
  [in] DWORD* pcContent
);
fWrite
Indicates whether the mapped area will subsequently be written.
ppbContent
Pointer to receive the pointer to the content.
pcContent
Pointer to receive the size of the content.

Return Values

Value Description
S_OK Success.

Remarks

Use this method to create a memory-mapped file for the message content. This allows for fast scanning of the content in memory. The memory is mapped using the MapViewOfFile function.

Call IMailMsgProperties::UnmapContent for each pointer you successfully receive using IMailMsgProperties::MapContent.

See Also

IMailMsgProperties::UnmapContent