A
Alexandre Soares
Hi,
I developped a COM addin using the wizard in visual studio .net. On several
machines, the add-in works fine, but on some others, weird things happen.
For instance, here's a sequence I've tried while debugging my addin on a
computer on which it didn't work:
1. I add lines at the beginning of all events in my connect.cs class (my
connection class) to write flags to a log file so that I know what events
are called
2. I uninstall my add-in from the test computer, make sure OUTLOOK.exe isn't
running and I install my add-in
3. I run outlook, my plug-in doesn't load, but checking the log file I
notice that:
- the constructor of my connection class is called
- the OnConnection event gets called
- the connectmode is cm_startup
In my OnConnection event handler, I check to see if the connecmode !=
cm_startup, in which case I manually call the event handler for
OnStartupComplete (where my initialization code resides).
Finally I notice that OnStartupComplete does NOT get called, and since
connecmode == cm_startup, it is not called manually in the
OnConnection event handler.
Then I thought about moving my code from OnStartupComplete to OnConnection,
since this event gets called. I repeated step 2 and 3 (see above) but this
time, the OnConnection did not even get called.
Any clue on what's going on?
Thank you very much for any help, I've been struggling with this problem for
several hours now...
Alexandre Soares
I developped a COM addin using the wizard in visual studio .net. On several
machines, the add-in works fine, but on some others, weird things happen.
For instance, here's a sequence I've tried while debugging my addin on a
computer on which it didn't work:
1. I add lines at the beginning of all events in my connect.cs class (my
connection class) to write flags to a log file so that I know what events
are called
2. I uninstall my add-in from the test computer, make sure OUTLOOK.exe isn't
running and I install my add-in
3. I run outlook, my plug-in doesn't load, but checking the log file I
notice that:
- the constructor of my connection class is called
- the OnConnection event gets called
- the connectmode is cm_startup
In my OnConnection event handler, I check to see if the connecmode !=
cm_startup, in which case I manually call the event handler for
OnStartupComplete (where my initialization code resides).
Finally I notice that OnStartupComplete does NOT get called, and since
connecmode == cm_startup, it is not called manually in the
OnConnection event handler.
Then I thought about moving my code from OnStartupComplete to OnConnection,
since this event gets called. I repeated step 2 and 3 (see above) but this
time, the OnConnection did not even get called.
Any clue on what's going on?
Thank you very much for any help, I've been struggling with this problem for
several hours now...
Alexandre Soares