Group:  Microsoft Outlook ยป microsoft.public.outlook.program_addins
Thread: Redemption

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Redemption
"Christoph" <c.jarisch[ at ]csdit.com> 03.03.2006 11:26:17
I wrote a COM Add-In, which works fine normally, but crashes on some
machines or it has the Resiliency Problem.

Therefore i'm asking if I'm doing everything right.

For example:

Private obCalendarItem As Object
Private moCalendarItem As Object
....
Private Sub moCalendarItems_ItemAdd(ByVal Item As Object)
Set obCalendarItem = Item
Set moCalendarItem = New Redemption.SafeAppointmentItem
moCalendarItem.Item = obCalendarItem
End Sub
....
At Explorer_Close and On_Disconnection I set these Objects to Nothing


I read, that Redemption can cause problems and can be solved with:
set Utils = CreateObject("Redemption.MAPIUtils")
Utils.Cleanup

But I also read, that CreateObject is responsibile to the Resiliency
problem because of script stoppers.

What can i do?

Re: Redemption
"Ken Slovak - [MVP - Outlook]" <kenslovak[ at ]mvps.org> 03.03.2006 14:18:24
If you have to create an object and some script blocker blocks that the
alternatives are to disable the script blocker or tell it to trust your
application, if that can be done with that script blocker. CreateObject
might possibly work better than New but it might not.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Christoph" <c.jarisch[ at ]csdit.com> wrote in message
news:1141385177.473855.80370[ at ]i39g2000cwa.googlegroups.com...
[Quoted Text]
>I wrote a COM Add-In, which works fine normally, but crashes on some
> machines or it has the Resiliency Problem.
>
> Therefore i'm asking if I'm doing everything right.
>
> For example:
>
> Private obCalendarItem As Object
> Private moCalendarItem As Object
> ...
> Private Sub moCalendarItems_ItemAdd(ByVal Item As Object)
> Set obCalendarItem = Item
> Set moCalendarItem = New Redemption.SafeAppointmentItem
> moCalendarItem.Item = obCalendarItem
> End Sub
> ...
> At Explorer_Close and On_Disconnection I set these Objects to Nothing
>
>
> I read, that Redemption can cause problems and can be solved with:
> set Utils = CreateObject("Redemption.MAPIUtils")
> Utils.Cleanup
>
> But I also read, that CreateObject is responsibile to the Resiliency
> problem because of script stoppers.
>
> What can i do?
>

Re: Redemption
"Christoph" <c.jarisch[ at ]csdit.com> 03.03.2006 16:04:52
Thank you Ken,

but that are not good news because I have to create a lot objects.
So i'm also making database transactions within the add-in.
The recordsets have also to be crated with new. For that problem, what
would be the better solution?
Dim rst as New ADODB.Recordset
or
Dim rst as ADODB.Recordset
Set rst = New ADODB Recordset

Re: Redemption
"Ken Slovak - [MVP - Outlook]" <kenslovak[ at ]mvps.org> 03.03.2006 21:40:20
I don't think there's any difference between the two.

If you have to create objects and that's blocked there's not much I can tell
you, that's a setting on the user's computer you'd have to work with.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Christoph" <c.jarisch[ at ]csdit.com> wrote in message
news:1141401892.516585.88240[ at ]i39g2000cwa.googlegroups.com...
[Quoted Text]
> Thank you Ken,
>
> but that are not good news because I have to create a lot objects.
> So i'm also making database transactions within the add-in.
> The recordsets have also to be crated with new. For that problem, what
> would be the better solution?
> Dim rst as New ADODB.Recordset
> or
> Dim rst as ADODB.Recordset
> Set rst = New ADODB Recordset
>

Re: Redemption
"Christoph" <c.jarisch[ at ]csdit.com> 06.03.2006 09:16:02
Thank you Ken!

I think I included all workarounds of getting the common Add-In
problems. And now I don't know how to make it better. (I checked the
code for so many times without finding an error)
My Add-In does a lot and maybe I have to live with problems, because
the whole COM thing is buggy and can cause many problems.

Another question:
Sometimes I have to depend on the error handling because some objects
are causing errors but only in really rare cases which I don't know.
(Normally I don't get errors, when I uncomment the error handling)
Although I'm using "On error goto... or ...resume next" an error
can cause an Outlook crash?

Re: Redemption
"Ken Slovak - [MVP - Outlook]" <kenslovak[ at ]mvps.org> 06.03.2006 15:26:17
It depends on what error and where it came from. I've found errors fired by
embedded Web browser controls used in some Outlook projects that will fire
errors that can't be trapped from VB or Outlook, they are Windows unhandled
exceptions and there's not much you can do with that.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Christoph" <c.jarisch[ at ]csdit.com> wrote in message
news:1141636562.037593.32720[ at ]j33g2000cwa.googlegroups.com...
[Quoted Text]
> Thank you Ken!
>
> I think I included all workarounds of getting the common Add-In
> problems. And now I don't know how to make it better. (I checked the
> code for so many times without finding an error)
> My Add-In does a lot and maybe I have to live with problems, because
> the whole COM thing is buggy and can cause many problems.
>
> Another question:
> Sometimes I have to depend on the error handling because some objects
> are causing errors but only in really rare cases which I don't know.
> (Normally I don't get errors, when I uncomment the error handling)
> Although I'm using "On error goto... or ...resume next" an error
> can cause an Outlook crash?
>

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net