View Single Post
  #2  
Old June 30th 06, 05:48 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Catastrophic Failure while accessing Redemption.SafeMailItem.To and Recipients

Try to create and instantiate a global (class) variable that points to a
Redemption object - any object, such as Redemption.MAPIUtils.
Based on the source code that you sent to my private e-mail address, you
loop through multiple messages in Outlook and process them using
SafeMailItem.
Every Safe*Item (and MAPIUtils) object calls MAPIInitialize when created and
MAPIUninitialize when destroyed. Due to a bug in MAPI, calling
MAPIInitialize/MAPIUninitialize a few hundred times results in an error.
Having a global Redemption object ensures that MAPI is initialized only
once.

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

"jisha" u23608@uwe wrote in message news:62893529f8b54@uwe...
Hi,
I have a C# application in which I am using Redemption.dll version
4.
0.0.452.In this application I am trying to access Outlook 2003 MailItem,
by
setting that item as Redemption.SafeMailItem (sMailItem) .Trying to access
sMailItem.To and later i am accessing Redemption.Recipient address.At that
point this is sometimes giving Catastrophic Error(details below).Can you
tell
me why this is happening ? What is the solution?
Error details

"Details : Catastrophic failure
At Redemption.SafeMailItemClass.get_To()"



Ads