|
|
|
date: Tue, 29 Jul 2008 14:38:59 -0500,
group: microsoft.public.platformsdk.mapi
back
Re: MAPI_E_CALL_FAILED ?
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.
Scott McFadden wrote:
> Recently, I noticed that the message store OpenEntry code fails with
> MAPI_E_CALL_FAILED when opening mails on a certain exchange 2003 server.
> This does not happen on other exchange servers for which the same code is
> running.
>
> ULONG uObjType = 0;
> LPMESSAGE pMessage = NULL;
>
> hr = pMsgStore->OpenEntry(entryId->cb, (LPENTRYID)entryId->lpb, NULL,
> MAPI_BEST_ACCESS, &uObjType, (LPUNKNOWN FAR *)&pMessage);
> if (FAILED(hr))
> {
> //log error
> }
>
> What causes a MAPI_E_CALL_FAILED for IMessageStore::OpenEntry
>
> thanks
>
>
>
>
--
Regards,
Ashutosh Bhawasinka
email: discussion@ashutosh.in
MCSA - Messaging,
MCTS - .Net Windows Apps
date: Wed, 30 Jul 2008 02:09:19 +0530
author: Ashutosh am
Re: MAPI_E_CALL_FAILED ?
I did notice that it magically happens after 250 emails have been processed.
I am dilgent to release the IMessage so not sure what the resource leak is.
However, I will try to use the folder interface instead of the message
store.
thanks
"Ashutosh" <smbs-msdn@nospam.nospam> wrote in message
news:OvGawsb8IHA.1200@TK2MSFTNGP04.phx.gbl...
> 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.
>
> Scott McFadden wrote:
>> Recently, I noticed that the message store OpenEntry code fails with
>> MAPI_E_CALL_FAILED when opening mails on a certain exchange 2003 server.
>> This does not happen on other exchange servers for which the same code is
>> running.
>>
>> ULONG uObjType = 0;
>> LPMESSAGE pMessage = NULL;
>>
>> hr = pMsgStore->OpenEntry(entryId->cb, (LPENTRYID)entryId->lpb, NULL,
>> MAPI_BEST_ACCESS, &uObjType, (LPUNKNOWN FAR *)&pMessage);
>> if (FAILED(hr))
>> {
>> //log error
>> }
>>
>> What causes a MAPI_E_CALL_FAILED for IMessageStore::OpenEntry
>>
>> thanks
>>
>>
>>
>>
>
> --
> Regards,
> Ashutosh Bhawasinka
> email: discussion@ashutosh.in
> MCSA - Messaging,
> MCTS - .Net Windows Apps
date: Tue, 29 Jul 2008 16:47:28 -0500
author: Scott McFadden
Re: MAPI_E_CALL_FAILED ?
Ok, per Ashutosh's advice changed to opening the IMessage using the folder
interface instead of the message store interface. Similar problem, after
250 emails opened, subsequent OpenEntry attempts fail. I make sure to
release the IMessage on each iteration. Appears to be some kind of
resource leak. Not sure what though.
"Ashutosh" <smbs-msdn@nospam.nospam> wrote in message
news:OvGawsb8IHA.1200@TK2MSFTNGP04.phx.gbl...
> 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.
>
> Scott McFadden wrote:
>> Recently, I noticed that the message store OpenEntry code fails with
>> MAPI_E_CALL_FAILED when opening mails on a certain exchange 2003 server.
>> This does not happen on other exchange servers for which the same code is
>> running.
>>
>> ULONG uObjType = 0;
>> LPMESSAGE pMessage = NULL;
>>
>> hr = pMsgStore->OpenEntry(entryId->cb, (LPENTRYID)entryId->lpb, NULL,
>> MAPI_BEST_ACCESS, &uObjType, (LPUNKNOWN FAR *)&pMessage);
>> if (FAILED(hr))
>> {
>> //log error
>> }
>>
>> What causes a MAPI_E_CALL_FAILED for IMessageStore::OpenEntry
>>
>> thanks
>>
>>
>>
>>
>
> --
> Regards,
> Ashutosh Bhawasinka
> email: discussion@ashutosh.in
> MCSA - Messaging,
> MCTS - .Net Windows Apps
date: Tue, 29 Jul 2008 17:06:04 -0500
author: Scott McFadden
Re: MAPI_E_CALL_FAILED ?
Also, I see this in the exchange server log after the OpenEntry failure:
Mapi session "/o=ACME Inc./ou=AC/cn=Recipients/cn=FOTNUser" exceeded the
maximum of 250 objects of type "objtMessage"
"Ashutosh" <smbs-msdn@nospam.nospam> wrote in message
news:OvGawsb8IHA.1200@TK2MSFTNGP04.phx.gbl...
> 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.
>
> Scott McFadden wrote:
>> Recently, I noticed that the message store OpenEntry code fails with
>> MAPI_E_CALL_FAILED when opening mails on a certain exchange 2003 server.
>> This does not happen on other exchange servers for which the same code is
>> running.
>>
>> ULONG uObjType = 0;
>> LPMESSAGE pMessage = NULL;
>>
>> hr = pMsgStore->OpenEntry(entryId->cb, (LPENTRYID)entryId->lpb, NULL,
>> MAPI_BEST_ACCESS, &uObjType, (LPUNKNOWN FAR *)&pMessage);
>> if (FAILED(hr))
>> {
>> //log error
>> }
>>
>> What causes a MAPI_E_CALL_FAILED for IMessageStore::OpenEntry
>>
>> thanks
>>
>>
>>
>>
>
> --
> Regards,
> Ashutosh Bhawasinka
> email: discussion@ashutosh.in
> MCSA - Messaging,
> MCTS - .Net Windows Apps
date: Tue, 29 Jul 2008 17:17:17 -0500
author: Scott McFadden
Re: MAPI_E_CALL_FAILED ?
"Ashutosh" <smbs-msdn@nospam.nospam> wrote in message
news:OvGawsb8IHA.1200@TK2MSFTNGP04.phx.gbl...
|
| 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.
Ashutosh,
I think that this is absolutely wrong. Typically ENTRYID is composed binary.
For example, first two bytes can pointed to version of MsgStore, next two
bytes - type of object (Folder, Message, etc..), next 16 bytes - UID of
parent object, next 16 bytes - UID of same object. Regarding unique
implementation of MsgStore, ENTRYID structure of course can be different.
But MsgStore, in most of cases, never search thru all existing objects. Lets
we imagine, that objects are stored to SQL database and ENTRYID is equal to
1103123456890, where 11 is version, 03 is object type, and 1234567890 is
object UID. Then MsgStore interface (some hypothetic implementation), will
construct this SQL query:
SELECT OBJECT_PROPERTIES FROM OBJECT_TABLE WHERE OBJECT_TYPE=3 AND
UID=1234567890
And if operation is succeeded, will return IMessage interface.
IvanK,
www.imibo.com
date: Wed, 30 Jul 2008 09:13:30 +0300
author: IvanK
Re: MAPI_E_CALL_FAILED ?
Well I must say that I don't know how the entry ID is composed. But I
have seen cases(sometimes) of failure when trying to open the message
through the store interface (also session). So, that was nothing of
concept, but just practical observation.
Hope Dmitry or someone else from MS put some light on it :)
IvanK wrote:
> "Ashutosh" <smbs-msdn@nospam.nospam> wrote in message
> news:OvGawsb8IHA.1200@TK2MSFTNGP04.phx.gbl...
> |
> | 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.
>
>
> Ashutosh,
> I think that this is absolutely wrong. Typically ENTRYID is composed binary.
> For example, first two bytes can pointed to version of MsgStore, next two
> bytes - type of object (Folder, Message, etc..), next 16 bytes - UID of
> parent object, next 16 bytes - UID of same object. Regarding unique
> implementation of MsgStore, ENTRYID structure of course can be different.
> But MsgStore, in most of cases, never search thru all existing objects. Lets
> we imagine, that objects are stored to SQL database and ENTRYID is equal to
> 1103123456890, where 11 is version, 03 is object type, and 1234567890 is
> object UID. Then MsgStore interface (some hypothetic implementation), will
> construct this SQL query:
> SELECT OBJECT_PROPERTIES FROM OBJECT_TABLE WHERE OBJECT_TYPE=3 AND
> UID=1234567890
>
> And if operation is succeeded, will return IMessage interface.
>
> IvanK,
> www.imibo.com
>
>
>
date: Wed, 30 Jul 2008 13:54:45 +0530
author: Ashutosh am
Re: MAPI_E_CALL_FAILED ?
Now that you posted such comments, I will have to test my application
with so many mails in exchange mailbox!!! But I have tested my
application with around 3600 messages(most of then containing large
attachments) in a PST and my application works perfectly without any
problem (& no memory leaks :-) )
I will try it with exchange mailbox and see if there is any limit & let
you know. But I can't be sure of time it will take :)
--
Regards,
Ashutosh Bhawasinka
email: discussion@ashutosh.in
MCSA - Messaging,
MCTS - .Net Windows Apps
Scott McFadden wrote:
> Also, I see this in the exchange server log after the OpenEntry failure:
>
> Mapi session "/o=ACME Inc./ou=AC/cn=Recipients/cn=FOTNUser" exceeded the
> maximum of 250 objects of type "objtMessage"
>
>
>
> "Ashutosh" <smbs-msdn@nospam.nospam> wrote in message
> news:OvGawsb8IHA.1200@TK2MSFTNGP04.phx.gbl...
>
>> 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.
>>
>> Scott McFadden wrote:
>>
>>> Recently, I noticed that the message store OpenEntry code fails with
>>> MAPI_E_CALL_FAILED when opening mails on a certain exchange 2003 server.
>>> This does not happen on other exchange servers for which the same code is
>>> running.
>>>
>>> ULONG uObjType = 0;
>>> LPMESSAGE pMessage = NULL;
>>>
>>> hr = pMsgStore->OpenEntry(entryId->cb, (LPENTRYID)entryId->lpb, NULL,
>>> MAPI_BEST_ACCESS, &uObjType, (LPUNKNOWN FAR *)&pMessage);
>>> if (FAILED(hr))
>>> {
>>> //log error
>>> }
>>>
>>> What causes a MAPI_E_CALL_FAILED for IMessageStore::OpenEntry
>>>
>>> thanks
>>>
>>>
>>>
>>>
>>>
>> --
>> Regards,
>> Ashutosh Bhawasinka
>> email: discussion@ashutosh.in
>> MCSA - Messaging,
>> MCTS - .Net Windows Apps
>>
>
>
>
date: Wed, 30 Jul 2008 14:00:17 +0530
author: Ashutosh Bhawasinka
Re: MAPI_E_CALL_FAILED ?
Just tested my application with 3588 messages (around 400 MB in size) in
a exchange 2003 mailbox. The application for test, opened every message
and did some processing on it. The application ran without any problem.
So, by default there is no limit on the exchange server. Looks like your
exchange admin has configured something. I will try to find out the
settings if possible.
Also from your post its clear that there is a limit set. So, in that
case you have only one option (if you can't change server settings) to
logoff the session and login again.
--
Regards,
Ashutosh Bhawasinka
email: discussion@ashutosh.in
MCSA - Messaging,
MCTS - .Net Windows Apps
Ashutosh Bhawasinka wrote:
> Now that you posted such comments, I will have to test my application
> with so many mails in exchange mailbox!!! But I have tested my
> application with around 3600 messages(most of then containing large
> attachments) in a PST and my application works perfectly without any
> problem (& no memory leaks :-) )
>
> I will try it with exchange mailbox and see if there is any limit &
> let you know. But I can't be sure of time it will take :)
> --
> Regards,
> Ashutosh Bhawasinka
> email: discussion@ashutosh.in
> MCSA - Messaging,
> MCTS - .Net Windows Apps
>
> Scott McFadden wrote:
>> Also, I see this in the exchange server log after the OpenEntry failure:
>>
>> Mapi session "/o=ACME Inc./ou=AC/cn=Recipients/cn=FOTNUser" exceeded the
>> maximum of 250 objects of type "objtMessage"
>>
>>
>>
>> "Ashutosh" <smbs-msdn@nospam.nospam> wrote in message
>> news:OvGawsb8IHA.1200@TK2MSFTNGP04.phx.gbl...
>>
>>> 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.
>>>
>>> Scott McFadden wrote:
>>>
>>>> Recently, I noticed that the message store OpenEntry code fails with
>>>> MAPI_E_CALL_FAILED when opening mails on a certain exchange 2003 server.
>>>> This does not happen on other exchange servers for which the same code is
>>>> running.
>>>>
>>>> ULONG uObjType = 0;
>>>> LPMESSAGE pMessage = NULL;
>>>>
>>>> hr = pMsgStore->OpenEntry(entryId->cb, (LPENTRYID)entryId->lpb, NULL,
>>>> MAPI_BEST_ACCESS, &uObjType, (LPUNKNOWN FAR *)&pMessage);
>>>> if (FAILED(hr))
>>>> {
>>>> //log error
>>>> }
>>>>
>>>> What causes a MAPI_E_CALL_FAILED for IMessageStore::OpenEntry
>>>>
>>>> thanks
>>>>
>>>>
>>>>
>>>>
>>>>
>>> --
>>> Regards,
>>> Ashutosh Bhawasinka
>>> email: discussion@ashutosh.in
>>> MCSA - Messaging,
>>> MCTS - .Net Windows Apps
>>>
>>
>>
>>
date: Wed, 30 Jul 2008 15:09:13 +0530
author: Ashutosh Bhawasinka
Re: MAPI_E_CALL_FAILED ?
I think you are mixing IMAPISession;;OpenEntry with IMsgStore::OpenEntry.
The former one can fail if the parent store has never been opened in the
current session and MAPI does not know which store is responsible for it.
There is no difference between IMsgStore::OpenEntry and
IMAPIFolder::OpenEntry unless IMsgStore is cached and IMAPIFolder is online.
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Ashutosh" <smbs-msdn@nospam.nospam> wrote in message
news:%237qH92h8IHA.3724@TK2MSFTNGP03.phx.gbl...
> Well I must say that I don't know how the entry ID is composed. But I have
> seen cases(sometimes) of failure when trying to open the message through
> the store interface (also session). So, that was nothing of concept, but
> just practical observation.
>
> Hope Dmitry or someone else from MS put some light on it :)
> IvanK wrote:
>> "Ashutosh" <smbs-msdn@nospam.nospam> wrote in message
>> news:OvGawsb8IHA.1200@TK2MSFTNGP04.phx.gbl...
>> |
>> | 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.
>>
>>
>> Ashutosh,
>> I think that this is absolutely wrong. Typically ENTRYID is composed
>> binary. For example, first two bytes can pointed to version of MsgStore,
>> next two bytes - type of object (Folder, Message, etc..), next 16 bytes -
>> UID of parent object, next 16 bytes - UID of same object. Regarding
>> unique implementation of MsgStore, ENTRYID structure of course can be
>> different. But MsgStore, in most of cases, never search thru all existing
>> objects. Lets we imagine, that objects are stored to SQL database and
>> ENTRYID is equal to 1103123456890, where 11 is version, 03 is object
>> type, and 1234567890 is object UID. Then MsgStore interface (some
>> hypothetic implementation), will construct this SQL query:
>> SELECT OBJECT_PROPERTIES FROM OBJECT_TABLE WHERE OBJECT_TYPE=3 AND
>> UID=1234567890
>>
>> And if operation is succeeded, will return IMessage interface.
>>
>> IvanK,
>> www.imibo.com
>>
>>
date: Wed, 30 Jul 2008 09:45:13 -0700
author: Dmitry Streblechenko
|
|