[This is now documented here: http://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:
Performs post-send categorization on a mail item based on its PidTagConversationId.
|HRESULT WINAPI HrProcessConvActionForSentItem(
SBinary const *pmbinStoreEid,
SBinary const *pmbinMsgEid,
SBinary const *pmbinConvID,
[in] The PidTagEntryId of the mail item. Cannot be NULL or invalid.
[in] The PidTagConversationId of the mail item. Cannot be NULL or invalid.
[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.
S_OK on success, or a FAILED HRESULT on failure
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.