I am trying to read the Messages in the Exchange Users MailBox. While
Opening the Folders[Inbox, Sent Items, etc, .... ] of the Users using
the following code
LPMDB mesgStore;
HRESULT hr = lpMAPISession->OpenMsgStore(0, lpcbEntryID,
(LPENTRYID)lppEntryID,NULL,
MAPI_BEST_ACCESS | MDB_NO_MAIL,
&mesgStore);
lppEntryID refers to the entry id of the user MailBox
HRESULT hr = mesgStore->OpenEntry(size, (LPENTRYID)entryID, NULL,
MAPI_BEST_ACCESS , &ulObjType,
(LPUNKNOWN *)&folder);
tempEntryID refers to the entry id of the particular folder in the
particular user MailBox,
The OpemEntry method fails with MAPI_E_CALL_FAILED error.....
Any suggestions why the function fails with this error .....
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"deenad" <tsg...@gmail.com> wrote in message
news:147564fa-dd3f-4690...@i29g2000prf.googlegroups.com...
Yes, I forget to release the folder before I have opened. After
releasing that folder resolves this issue. On the other note it was
happening for the 50th Folder.
Thanks
On Jan 21, 10:00 pm, "Dmitry Streblechenko" <dmi...@dimastr.com>
wrote:
> How many messgaes do you open prior to receiving this error? How many?
> Around 250?
> Do you release the messages that you opened before?
>
> Dmitry Streblechenko (MVP)http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
>
> "deenad" <tsg...@gmail.com> wrote in message
>
> news:147564fa-dd3f-4690...@i29g2000prf.googlegroups.com...
>
>
>
> > Hi,
>
> > I am trying to read the Messages in the Exchange Users MailBox. While
> > Opening the Folders[Inbox, Sent Items, etc, .... ] of the Users using
> > the following code
>
> > LPMDB mesgStore;
>
> > HRESULT hr = lpMAPISession->OpenMsgStore(0, lpcbEntryID,
> > (LPENTRYID)lppEntryID,NULL,
> > MAPI_BEST_ACCESS | MDB_NO_MAIL,
> > &mesgStore);
>
> > lppEntryID refers to the entry id of the user MailBox
>
> > HRESULT hr = mesgStore->OpenEntry(size, (LPENTRYID)entryID, NULL,
> > MAPI_BEST_ACCESS , &ulObjType,
>
> > (LPUNKNOWN *)&folder);
>
> > tempEntryID refers to the entry id of the particular folder in the
> > particular user MailBox,
>
> > The OpemEntry method fails with MAPI_E_CALL_FAILED error.....
>
> > Any suggestions why the function fails with this error .....- Hide quoted text -
>
> - Show quoted text -
I wonder if you can help me: you say "do you release the messages" but I can't see any dispose method or anything like that...?
I have this problem - I iterate through the collection returned by GetEnumerator on the Folder.Items collection - I check certain values on each and maybe save them to a database like so.. (simplified)
System.Collections.IEnumerator ienumMailItems;
ienumMailItems = fProcess.Items.GetEnumerator();
while (ienumMailItems.MoveNext())
{
mi = (Redemption.RDOMail)ienumMailItems.Current;
SaveToDatabase(mi);
}
What do I need to do to release the message?
Thanks in advance,
Dominic
> On Monday, January 21, 2008 12:00 PM Dmitry Streblechenko wrote:
> How many messgaes do you open prior to receiving this error? How many?
> Around 250?
> Do you release the messages that you opened before?
>
> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
>
> "deenad" <tsg...@gmail.com> wrote in message
> news:147564fa-dd3f-4690...@i29g2000prf.googlegroups.com...
>> On Thursday, February 07, 2008 4:00 AM deenad wrote:
>> Hi,
>>
>> I am trying to read the Messages in the Exchange Users MailBox. While
>> Opening the Folders[Inbox, Sent Items, etc, .... ] of the Users using
>> the following code
>>
>> LPMDB mesgStore;
>>
>> HRESULT hr = lpMAPISession->OpenMsgStore(0, lpcbEntryID,
>> (LPENTRYID)lppEntryID,NULL,
>> MAPI_BEST_ACCESS | MDB_NO_MAIL,
>> &mesgStore);
>>
>> lppEntryID refers to the entry id of the user MailBox
>>
>> HRESULT hr = mesgStore->OpenEntry(size, (LPENTRYID)entryID, NULL,
>> MAPI_BEST_ACCESS , &ulObjType,
>>
>> (LPUNKNOWN *)&folder);
>>
>> tempEntryID refers to the entry id of the particular folder in the
>> particular user MailBox,
>>
>> The OpemEntry method fails with MAPI_E_CALL_FAILED error.....
>>
>> Any suggestions why the function fails with this error .....
>>> On Thursday, February 07, 2008 4:00 AM deenad wrote:
>>> Hi Dmitry,
>>>
>>> Yes, I forget to release the folder before I have opened. After
>>> releasing that folder resolves this issue. On the other note it was
>>> happening for the 50th Folder.
>>>
>>> Thanks
>>>
>>> On Jan 21, 10:00=A0pm, "Dmitry Streblechenko" <dmi...@dimastr.com>
>>> wrote:
>>> IL,
>>> d text -
>>> Submitted via EggHeadCafe - Software Developer Portal of Choice
>>> Simple .NET HEX PixelColor Utility
>>> http://www.eggheadcafe.com/tutorials/aspnet/5617a491-963d-4510-b8f1-1863ddf52bc1/simple-net-hex-pixelcolor-utility.aspx
Redemption specific questiosn can be posted to
http://tech.groups.yahoo.com/group/Outlook-Redemption/
Submitted via EggHeadCafe - Software Developer Portal of Choice
Book Review: Google Analytics
http://www.eggheadcafe.com/tutorials/aspnet/a855a620-50a8-487c-9fac-b85f8fda2442/book-review-google-analytics.aspx