Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Tue, 5 Aug 2008 16:48:08 -0500,    group: microsoft.public.platformsdk.mapi        back       


MAPI_E_INVALID_ENTRYID   
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: Tue, 5 Aug 2008 16:48:08 -0500   author:   Scott McFadden

Re: MAPI_E_INVALID_ENTRYID   
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: Tue, 5 Aug 2008 21:26:07 -0700   author:   Dmitry Streblechenko

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

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us