Group:  Microsoft Outlook » microsoft.public.outlook.program_addins
Thread: unload COM addin problem

Geek News

unload COM addin problem
"David Cebrian" <david_cebrian[ at ]msn.com> 2/8/2006 5:10:56 PM
Hi,

I have got an error when I try to unload my addin from Outlook 2003.

The error:

UnInitHandler Exception: {0} Exception HRESULT: 0x800A01A8

I get this message when the addin execute the line of code that remove one
of my CommandBarButtons
If Not (cbbEnvioSMS Is Nothing) Then

cbbEnvioSMS.Delete()

End If

I am programing in VS.NET 2003.

Anyone knows why occurs this error.

Thanks,

Jaume


Re: unload COM addin problem
"Thaddaeus Parker" <tparker[ at ]microlinkllc.com> 2/8/2006 5:37:48 PM
From the sounds of it you are attempting delete the button in the
UninitHandler AFTER the Explorer_Event_Close has already fired. The
explorer close event is where you want to get rid of all of your buttons,
etc.
Otherwise you will get the exception that you are seeing now, this is
because the COM-Addin has already "collected" the garbage leaving your
managed object dangling. When you attempt to delete using the function
Delete(), the object doesn't exist in memory any more and promptly throws an
exception. This in turn leaves some bad references in memory that causes
Outlook to remain in memory because it thinks that there is still something
out there that requires it to be resident in memory.

Regards,

Thaddaeus.
"David Cebrian" <david_cebrian[ at ]msn.com> wrote in message
news:%23og7qJNLGHA.1312[ at ]TK2MSFTNGP09.phx.gbl...
[Quoted Text]
> Hi,
>
> I have got an error when I try to unload my addin from Outlook 2003.
>
> The error:
>
> UnInitHandler Exception: {0} Exception HRESULT: 0x800A01A8
>
> I get this message when the addin execute the line of code that remove one
> of my CommandBarButtons
> If Not (cbbEnvioSMS Is Nothing) Then
>
> cbbEnvioSMS.Delete()
>
> End If
>
> I am programing in VS.NET 2003.
>
> Anyone knows why occurs this error.
>
> Thanks,
>
> Jaume
>
>


Re: unload COM addin problem
"Ken Slovak - [MVP - Outlook]" <kenslovak[ at ]mvps.org> 2/8/2006 7:05:20 PM
If the button is created using the Temporary := True argument usually no
deleting is actually necessary for Explorer buttons. That's usually only
needed if an Inspector button is created for WordMail.

--
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


"Thaddaeus Parker" <tparker[ at ]microlinkllc.com> wrote in message
news:OJcu9ZNLGHA.1676[ at ]TK2MSFTNGP09.phx.gbl...
[Quoted Text]
> From the sounds of it you are attempting delete the button in the
> UninitHandler AFTER the Explorer_Event_Close has already fired. The
> explorer close event is where you want to get rid of all of your buttons,
> etc.
> Otherwise you will get the exception that you are seeing now, this is
> because the COM-Addin has already "collected" the garbage leaving your
> managed object dangling. When you attempt to delete using the function
> Delete(), the object doesn't exist in memory any more and promptly throws
> an exception. This in turn leaves some bad references in memory that
> causes Outlook to remain in memory because it thinks that there is still
> something out there that requires it to be resident in memory.
>
> Regards,
>
> Thaddaeus.

Re: unload COM addin problem
"David Cebrian" <david_cebrian[ at ]msn.com> 2/9/2006 10:26:19 AM
Thanks for all,

it's so useful.


"David Cebrian" <david_cebrian[ at ]msn.com> escribió en el mensaje
news:%23og7qJNLGHA.1312[ at ]TK2MSFTNGP09.phx.gbl...
[Quoted Text]
> Hi,
>
> I have got an error when I try to unload my addin from Outlook 2003.
>
> The error:
>
> UnInitHandler Exception: {0} Exception HRESULT: 0x800A01A8
>
> I get this message when the addin execute the line of code that remove one
> of my CommandBarButtons
> If Not (cbbEnvioSMS Is Nothing) Then
>
> cbbEnvioSMS.Delete()
>
> End If
>
> I am programing in VS.NET 2003.
>
> Anyone knows why occurs this error.
>
> Thanks,
>
> Jaume
>
>


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