Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.


Windows Mobile 6.5

The CreateMessage method creates a new message within the current folder.

HRESULT CreateMessage (
  LPCIID lpInterface,
  ULONG ulFlags,
  LPMESSAGE FAR * lppMessage


[in] Must be NULL.


[in] Must be zero.


[out] Reference to the newly created message, implemented on IMessage.

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


Indicates success.

CreateMessage creates a new message with generic or associated content and assigns an entry identifier. The entry identifier is made up of a part that represents the message store provider and a part that represents the individual message.

The lppMessage must be released to clean up the allocated memory.

The entry identifier of the new message is available immediately after CreateMessage returns.

Expect the entry identifier assigned to the new message to be unique within the current message store as well as across all of the message stores that are open concurrently. One exception to this general rule occurs when multiple entries for a message store appear in the profile, causing the message store to be opened multiple times and entry identifiers to be duplicated.

To create an outgoing message, call the Outbox folder's CreateMessage method. Then call IMessage::SubmitMessage to actually send the message.

If you delete a folder containing a new message before the message is saved, the results are undefined.

Windows Embedded CEWindows CE 3.0 and later
Windows MobilePocket PC 2002 and later, Smartphone 2002 and later



Other Resources


Community Additions

© 2015 Microsoft