PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook Program Addins Add-in stops getting notifications

Reply

Add-in stops getting notifications

 
Thread Tools Rate Thread
Old 17-12-2003, 07:37 AM   #1
David Schwartz
Guest
 
Posts: n/a
Default Add-in stops getting notifications


I wrote a C# COM add-in based on the sample from MSDN.
In OnConnection() I sign up for the
applicationObject.Inspectors.NewInspector event using the
following code:
applicationObject.Inspectors.NewInspector +=
new Outlook.InspectorsEvents_NewInspectorEventHandler
(NewInspectorMethod);

At some point I stop getting this notification.
To be more specific, when I open a new meeting request, I
add some buttons to the command bar, and when I open one
of my forms, by pressing these buttons, I stop getting
the NewInspector event.
I've checked that I don't have any unhandled exceptions
in my code, so I don't think that my code caused the add-
in to unload.

Is this a known issue? if so, is there anything I can do
to solve it?
  Reply With Quote
Old 17-12-2003, 03:15 PM   #2
Dmitry Streblechenko
Guest
 
Posts: n/a
Default Re: Add-in stops getting notifications

Try to store applicationObject.Inspectors as a class variable and set up the
events as:

m_inspectors = applicationObject.Inspectors;
m_inspectors .NewInspector += new
Outlook.InspectorsEvents_NewInspectorEventHandler(NewInspectorMethod);

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


"David Schwartz" <sdaves@t2.technion.ac.il> wrote in message
news:072101c3c470$95efae40$a401280a@phx.gbl...
> I wrote a C# COM add-in based on the sample from MSDN.
> In OnConnection() I sign up for the
> applicationObject.Inspectors.NewInspector event using the
> following code:
> applicationObject.Inspectors.NewInspector +=
> new Outlook.InspectorsEvents_NewInspectorEventHandler
> (NewInspectorMethod);
>
> At some point I stop getting this notification.
> To be more specific, when I open a new meeting request, I
> add some buttons to the command bar, and when I open one
> of my forms, by pressing these buttons, I stop getting
> the NewInspector event.
> I've checked that I don't have any unhandled exceptions
> in my code, so I don't think that my code caused the add-
> in to unload.
>
> Is this a known issue? if so, is there anything I can do
> to solve it?



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off