IExchExtCallback::GetNewMessageSite
Returns interface pointers to the message, message site, and view context for a new message that is being composed. Using these interface pointers, an extension object can display a form for the new message.
Quick Info
See IExchExtCallback : IUnknown.
HRESULT GetNewMessageSite(
ULONG fComposeInFolder,
LPMAPIFOLDER pfldFocus,
LPPERSISTMESSAGE ppermsg,
LPMESSAGE FAR * ppmsg,
LPMAPIMESSAGESITE FAR * ppmms,
LPMAPIVIEWCONTEXT FAR * ppmvc,
ULONG ulFlags
);
Parameters
-
fComposeInFolder
-
[in] Indicates whether the message is being composed in the same folder from which it was activated. If this flag is TRUE, the message site supports default behavior for posting messages, which means that the message always remains in the same folder in which it was created. If this flag is FALSE, the message site supports default behavior for sending messages, which means that messages are automatically moved to the Outbox or Inbox when the user sends or saves the message.
-
pfldFocus
-
[in] Pointer to the folder in which the message is to be composed.
-
ppermsg
-
[in] Pointer to a pointer to the IPersistMessage interface on the form for which the new message site is being obtained.
-
ppmsg
-
[out] Pointer to a pointer to the message being composed.
-
ppmms
-
[out] Pointer to a pointer to the MAPI message site for the new message.
-
ppmvc
-
[out] Pointer to a pointer to the MAPI view context for the new message.
-
ulFlags
-
[in] Bitmask of flags. The following flag can be set:
-
EECBGNMS_MODAL
-
The new form should be modal.
Return Values
-
S_OK
-
No error occurred.
-
E_INVALIDARG
-
No session is associated with the context where the extension is installed or the ulFlags parameter has EECBGNMS_MODAL set.
Remarks
Extension objects call the IExchExtCallback::GetNewMessageSite method to display a form for a new message that the user has created. For example, an extension that performs scheduling functions might have a New Meeting menu command which results in the creation of a new message and the display of a custom form that enables users to fill in the fields of the message.