|
|
|
date: Tue, 5 Aug 2008 16:48:08 -0500,
group: microsoft.public.platformsdk.mapi
back
Re: MAPI_E_INVALID_ENTRYID
Work with just the root inbox.
Ashutosh Bhawasinka mentioned in one of his posts that it was more reliable
to use the folder instead of the msgstore.
>>Open it through the folder interface!! If you try to open the message
>>through the store interface, the store provider is not always able to
>>locate the message!
>>
>>Just imagine how much work the store provider has do if you call OpenEntry
>>without specifying the type or interface, it has search each and every
>>item that exist in the store, be it folder, message, or other special
>>things.
"Dmitry Streblechenko" wrote in message
news:%23v0Jfy39IHA.4916@TK2MSFTNGP02.phx.gbl...
> Do you wotk with only one folder? Is there a chnace you can mix entry ids
> from different stores?
> Why are you calling IMAPIFolder::OpenEntry rather than
> IMAPISession::OpenEntry or IMsgStore::OpenEntry?
>
> --
> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
> -
> "Scott McFadden" wrote in message
> news:uABD0T09IHA.2196@TK2MSFTNGP05.phx.gbl...
>> Ocassionally, when I attempt to open an email from the inbox folder I get
>> MAPI_E_INVALID_ENTRYID.
>>
>> LPMESSAGE pMessage = NULL;
>> hr = pFolder->OpenEntry(entryId->cb, (LPENTRYID)entryId->lpb, NULL,
>> MAPI_BEST_ACCESS, &uObjType, (LPUNKNOWN FAR *)&pMessage);
>> if (FAILED(hr))
>> {
>> //Log error
>> }
>>
>> I am perplexed how I can get an occasional INVALID_ENTRYID since I query
>> the folder's contents table for entry ID's.
>>
>>
>> Anyone else ever get MAPI_E_INVALID_ENTRYID?
>>
>> Exchange 2003
>> Extended MAPI using VC2008
>>
>>
>> thanks
>>
>
>
date: Wed, 6 Aug 2008 09:46:24 -0500
author: Scott McFadden
Re: MAPI_E_INVALID_ENTRYID
No, he is wrong. Is there any chance the entry id gets corrupted? Can you
log the value of the entry id and then use MMFMAPI or OutlookSpy to chekc
the a message with that entry id still exists?
Try to use IMAPISession::OpenEntry.
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Scott McFadden" wrote in message
news:u1Ei0M99IHA.224@TK2MSFTNGP06.phx.gbl...
> Work with just the root inbox.
>
> Ashutosh Bhawasinka mentioned in one of his posts that it was more
> reliable to use the folder instead of the msgstore.
>
>>>Open it through the folder interface!! If you try to open the message
>>>through the store interface, the store provider is not always able to
>>>locate the message!
>>>
>>>Just imagine how much work the store provider has do if you call
>>>OpenEntry without specifying the type or interface, it has search each
>>>and every item that exist in the store, be it folder, message, or other
>>>special things.
>
>
>
>
> "Dmitry Streblechenko" wrote in message
> news:%23v0Jfy39IHA.4916@TK2MSFTNGP02.phx.gbl...
>> Do you wotk with only one folder? Is there a chnace you can mix entry ids
>> from different stores?
>> Why are you calling IMAPIFolder::OpenEntry rather than
>> IMAPISession::OpenEntry or IMsgStore::OpenEntry?
>>
>> --
>> Dmitry Streblechenko (MVP)
>> http://www.dimastr.com/
>> OutlookSpy - Outlook, CDO
>> and MAPI Developer Tool
>> -
>> "Scott McFadden" wrote in message
>> news:uABD0T09IHA.2196@TK2MSFTNGP05.phx.gbl...
>>> Ocassionally, when I attempt to open an email from the inbox folder I
>>> get MAPI_E_INVALID_ENTRYID.
>>>
>>> LPMESSAGE pMessage = NULL;
>>> hr = pFolder->OpenEntry(entryId->cb, (LPENTRYID)entryId->lpb, NULL,
>>> MAPI_BEST_ACCESS, &uObjType, (LPUNKNOWN FAR *)&pMessage);
>>> if (FAILED(hr))
>>> {
>>> //Log error
>>> }
>>>
>>> I am perplexed how I can get an occasional INVALID_ENTRYID since I query
>>> the folder's contents table for entry ID's.
>>>
>>>
>>> Anyone else ever get MAPI_E_INVALID_ENTRYID?
>>>
>>> Exchange 2003
>>> Extended MAPI using VC2008
>>>
>>>
>>> thanks
>>>
>>
>>
>
>
date: Wed, 6 Aug 2008 09:21:41 -0700
author: Dmitry Streblechenko
|
|