I have develop app to process messages from Outlook.
User select a folder in Outlook (using PickFolder method from Outlook OOM)
after that I convert it to IMAPIFolder to retrieve messages directly using
Extended MAPI. But I'm getting an exception (Unhandled Exc at 0x000000c0 in
... : 0xC000005: Access violation reading location 0x000000C0)
Here is the code snippet of that:
pFolder=pApp->GetNamespace(_bstr_t("MAPI"))->PickFolder();
if (pFolder==NULL) return 0;
ATLASSERT(pFolder);
LPMAPIFOLDER pMapiFolder = NULL;
HRESULT hr = pFolder->get_MAPIOBJECT((IUnknown**)&pMapiFolder);
ATLASSERT(pMapiFolder);
LPMAPITABLE m_pContents;
pMapiFolder->GetContentsTable(CMAPIEx::cm_nMAPICode,&m_pContents); //
here I'm getting an exception
(MAPI ogged on and intialized at another place. I
cutted it here)
Thank you.
Victor
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Victor" <Vic...@discussions.microsoft.com> wrote in message
news:56215035-9501-4ECE...@microsoft.com...
Currently I'm having another difficulty and your help will be very
appreciated.
When I read BodyFormat property of the message it returns 2 (html format).
BUT when I save it as MSG file it is saved as plain text. I want program to
retrieve body as plain text in that cases and not as HtmlBody.
How do I can differentiate it?
I think that message simply contained with both types (HTML and Plain text).
How do I can detect that message has both types then?
Thanks again, Dmitry!
victor
"Dmitry Streblechenko" wrote:
> .
>
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Victor" <Vic...@discussions.microsoft.com> wrote in message
news:9F8760C8-18D8-4EEE...@microsoft.com...