HrProcessConvActionForSentItem

[This is now documented here: https://msdn.microsoft.com/en-us/library/ff976788.aspx]

If you’re like me, you spend your time using Depends to see what kinds of new and exciting functions are exported every time there’s a new release of Outlook. Ok – so I don’t really do that, but development did ask me to document one of those functions. Here we go:

HrProcessConvActionForSentItem

Performs post-send categorization on a mail item based on its PidTagConversationId.

Exported by:

outlook.exe
Called by: Client
Implemented by: Outlook
HRESULT WINAPI HrProcessConvActionForSentItem(     SBinary const *pmbinStoreEid,     SBinary const *pmbinMsgEid,     SBinary const *pmbinConvID,     DWORD dwFlags)

Parameters

pmbinStoreEid

[in] The PidTagEntryId of the store (or the PidTagStoreEntryId of the mail item).  Cannot be NULL or invalid.

pmbinMsgEid

[in] The PidTagEntryId of the mail item.  Cannot be NULL or invalid.

pmbinConvID

[in] The PidTagConversationId of the mail item.  Cannot be NULL or invalid.

dwFlags

[in] A bitmask of the following flags (recommend value is 0).  Unknown flags will result in E_INVALIDARG. The following flag can be set: 
PCAFSIF_MSGEID_IS_SEARCH_KEY (0x00000001) – The pmbinMsgEid argument is actually the PidTagSearchKey of the message.  This is more expensive and should be avoided if a PidTagEntryId is available.

Return Value

S_OK on success, or a FAILED HRESULT on failure

Remarks

Categories are considered personal information and should not be transmitted outside the user’s mailbox.  This function should be called on the Sent Item copy (or equivalent) of the mail item only after the mail item has been sent.

This function can only be called in process with Outlook.exe, such as from a COM Add-In. Attempts to call this function out of process will cause an access violation exception.

[update: 8/23/2010] Got confirmation from dev that this function is in-proc only after my attempt to add it to MFCMAPI caused a crash.