I use MAPI to retrieve Outlook Contact's comment, but if the content in comment to long, will return MAPI_E_NOT_ENOUGH_MEMORY error
-
Tuesday, January 15, 2013 2:55 AM
The code is:
SizedSPropTagArray ( 83, mcols ) = { 83,
........
PR_BODY_HTML, //21...
}
ULONG pcount;
SPropValue *props=0;
HRESULT hr = S_OK;hr = imsg->GetProps((SPropTagArray*)&mcols,0,&pcount,&props);
if (props[21].ulPropTag == PR_BODY_HTML)
{
addressBookItem->setNotes(props[21].Value.lpszA);
}The pr_body_html indicates the notes attribute of contact,
but if the notes of contact too long, I could not retrieve the attribute.
I also use the MFCMAPI tool to see the attribute, it also return MAPI_E_NOT_ENOUGH_MEMORY, so could someone tell me the reason? Is it the limition of MAPI?
All Replies
-
Tuesday, January 15, 2013 2:58 AM
Large string or binary properties must be opened as IStream using IMessage::OpenProperty.
Dmitry Streblechenko (MVP) http://www.dimastr.com/redemption
Redemption - what the Outlook
Object Model should have been
Version 5.4 is now available!
- Marked As Answer by hsm_computer Tuesday, January 15, 2013 3:13 AM
- Unmarked As Answer by hsm_computer Tuesday, January 15, 2013 3:51 AM
-
Thursday, January 17, 2013 2:46 AMModerator
Hi hsm_computer,
Thanks for posting in the MSDN Forum.
Would you please me what you need to be clarify based on Dmitry's replay?
Have a good day,
Tom
Tom Xu [MSFT]
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.

