I could not reply in the old question, so I open one discussion.
I have already use the following code:
char *bodybuf=0;
unsigned int bodysize=0;
IStream *istream;
//I also have tried PR_HTML
hr = imsg->OpenProperty(PR_BODY_HTML, &IID_IStream, 0, 0, (IUnknown**)&istream);
if (hr==S_OK)
{
STATSTG stg = {0};
hr = istream->Stat(&stg,STATFLAG_NONAME);
if (hr==S_OK)
{
bodysize = stg.cbSize.HighPart;
bodybuf = new char[bodysize+1];
ULONG red;
hr = istream->Read(bodybuf, bodysize, &red);
if (hr!=S_OK)
bodysize=0;
else if (red<bodysize)
bodysize=red;
bodybuf[bodysize]=0;
}
istream->Release();
}
but the bodysize is also 0, also the notes of contact is not empty.
Could the pr_html indicates the notes attribute of contact in MAPI?
Thank you very much.