Collaboration Data Objects - [E_OUTOFMEMORY(8007000E)] CDO1.2.1, also use Redemption.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

CDO version 1.2.1 (installed from Office 2000 CD

I am writing a VC++ using CDO 1.2.1 and redemtion to each message in folders and produce RFC822 files. the applicaiton never finished all 1750 messages. It stopped on Sub Folder2 (around message#1650)

Now I am very sure the application raise error o
CurrentMsg = msgs->GetNext();

How can I resovle the problem.

--- Folder Structure ------

Inbox Folder (550 messages
- Sub Folder 1 (600 messages
- Sub Folder 2 (600 message


-- Part of source code -------

CDO121::FoldersPtr Folders = base_folder->GetFolders(
CDO121::MessagesPtr msgs
CDO121::MessagePtr CurrentMs

based_folder = base_folder->GetName();
msgs = base_folder->GetMessages()

Redemption::ISafeMailItemPtr sItem
hr = m_SafeMailItemFactory->CreateInstance(NULL, __uuidof(Redemption::ISafeMailItem), (void**)&sItem)

nTotalMsgCount = msgs->Count;

MsgCount = msgs->Count

nIdx =1
for (;;)

CurrentMsg = msgs->GetNext(); ===> APPLICAITON FAILS HERE!

hr = sItem->put_Item(CurrentMsg)
hr = sItem->raw_SaveAs(_bstr_t(MsgFile), _variant_t((long)Redemption::olRFC822));

if ( nIdx == MsgCount
break

nIdx ++
 
See my reply to in the "MAPI Session timeout" thread.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool


Roger said:
CDO version 1.2.1 (installed from Office 2000 CD)

I am writing a VC++ using CDO 1.2.1 and redemtion to each message in
folders and produce RFC822 files. the applicaiton never finished all 1750
messages. It stopped on Sub Folder2 (around message#1650).
Now I am very sure the application raise error on
CurrentMsg = msgs->GetNext();


How can I resovle the problem.


--- Folder Structure -------

Inbox Folder (550 messages)
- Sub Folder 1 (600 messages)
- Sub Folder 2 (600 message)



-- Part of source code --------

CDO121::FoldersPtr Folders = base_folder->GetFolders()
CDO121::MessagesPtr msgs;
CDO121::MessagePtr CurrentMsg

based_folder = base_folder->GetName();
msgs = base_folder->GetMessages()

Redemption::ISafeMailItemPtr sItem;
hr = m_SafeMailItemFactory->CreateInstance(NULL,
__uuidof(Redemption::ISafeMailItem), (void**)&sItem);
 
Since you are already using Redemption, try to create an instance of the
Redemption.MAPIFolder object, assign MAPIFolder.Item property to
base_folder, then use MAPIFolder.Items collection instead of the CDO Folder
object.
Since MAPIFolder.Items.Item() returns Redemption.MessageItem, you won't need
to use Redemption.SafeMailItem object.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Back
Top