Platform SDK: MAPI |
The HrSzFromEntryID function encodes an entry identifier into an ASCII string.
Note This function may not be supported in future versions of MAPI.
Header file: | MAPIUTIL.H |
Implemented by: | MAPI |
Called by: | Client applications |
HrSzFromEntryID( ULONG cb, LPENTRYID pentry, LPTSTR FAR * psz );
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.
The HrSzFromEntryID function allocates memory for the ASCII string using the MAPIAllocateBuffer function.