Platform SDK: MAPI

HrComposeMsgID

The HrComposeMsgID function creates an ASCII string representing a compound entry identifier for an object, usually a message in a message store.

Note  This function may not be supported in future versions of MAPI.

Quick Info

Header file: MAPIUTIL.H
Implemented by: MAPI
Called by: Client applications

HrComposeMsgID(
  LPMAPISESSION psession,   
  ULONG cbStoreRecordKey,   
  LPBYTE pStoreRecordKey,   
  ULONG cbMsgEID,        
  LPENTRYID pMsgEID,     
  LPTSTR FAR * pszMsgID  
);
 

Parameters

psession
[in] Pointer to the session in use by the client application.
cbStoreRecordKey
[in] Size, in bytes, of the record key of the message store containing the message or other object. If zero is passed in the cbStoreRecordKey parameter, the pszMsgID parameter points to a copy of the entry identifier converted to text.
pStoreRecordKey
[in] Pointer to the record key of the message store containing the message or other object.
cbMsgEID
[in] Size, in bytes, of the entry identifier of the message or other object.
pMsgEID
[in] Pointer to the entry identifier of the object.
pszMsgID
[out] Pointer to the returned ASCII string. If the cbStoreRecordKey parameter is greater than zero, the pszMsgID parameter points to a compound entry identifier converted to text. If cbStoreRecordKey is zero, pszMsgID points to a noncompound entry identifier converted to text.

Remarks

If the message or other object for which the compound entry identifier is being created resides in a message store, the identifier string is created from the object's entry identifier and the store's record key. If the object is not in a store, that is, if the byte count for the store record key passed in the cbStoreRecordKey parameter is zero, the object's entry identifier is simply copied and converted into a string.

Calling the HrComposeMsgID function is equivalent to calling the HrComposeEID function and then the HrSzFromEntryID function.

HrComposeMsgID enables client applications based on Simple MAPI and OLE to work with objects in multiple stores through the use of compound entry identifiers. An application can call the HrDecomposeMsgID function to split the compound entry identifier into its original constituents.

See Also

Entry Identifier Functions