HrSzFromEntryID

The HrSzFromEntryID function encodes an entry identifier into an ASCII string.

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

HrSzFromEntryID(
  ULONG cb,           
  LPENTRYID pentry,   
  LPTSTR FAR * psz    
);
 

Parameters

cb
[in] Size, in bytes, of the entry identifier pointed to by the pentry parameter.
pentry
[in] Pointer to an ENTRYID structure containing the entry identifier to be encoded.
psz
[out] Pointer to the returned ASCII string.

Remarks

The HrEntryIDFromSz and HrSzFromEntryID functions provide conversion between the string and binary formats of entry identifiers. Simple MAPI uses ASCII strings for message identifiers, while MAPI uses structures with binary data.

A client application using Simple MAPI for most message operations may need to resort to MAPI in some cases. The only folder recognized by Simple MAPI is the Inbox, and if the client needs to access messages in another folder, it must use MAPI methods to look through that folder's contents table, which holds message entry identifiers. When the client finds the entry identifier for the desired message, it can call HrSzFromEntryID to convert the entry identifier to a Simple MAPI identifier string so the message can be manipulated in Simple MAPI. Then the client can call the Simple MAPI MAPIReadMail function to retrieve the required information about the message.

Notes to Callers

The HrSzFromEntryID function allocates memory for the ASCII string using the MAPIAllocateBuffer function.

See Also

Entry Identifier Functions