Is it possible to receive OnNotify events on a IMAPIAdviseSink after the Unadvise is called? (I have seen cases where an OnNotify event seems to get delayed by about 30 seconds, even though we do read the PR_TEST_LINE_SPEED property before calling Advise.) I am wondering if a problem I have is caused by something like this: 1. call Unadvise 2. delete the object that services the OnNotify event 3. receive an OnNotify event (message) Thanks, Frank
Not unles you used that advise sink in multiple calls to Advise(). -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "Frank S" <OldGrouch@community.nospam> wrote in message news:O90m0gMpIHA.524@TK2MSFTNGP05.phx.gbl... > Is it possible to receive OnNotify events on a IMAPIAdviseSink after the > Unadvise is called? > > (I have seen cases where an OnNotify event seems to get delayed by about > 30 seconds, even though we do read the PR_TEST_LINE_SPEED property before > calling Advise.) > > I am wondering if a problem I have is caused by something like this: > > 1. call Unadvise > 2. delete the object that services the OnNotify event > 3. receive an OnNotify event (message) > > Thanks, > > Frank
Hi Frank, > Is it possible to receive OnNotify events on a IMAPIAdviseSink after > the Unadvise is called? > > (I have seen cases where an OnNotify event seems to get delayed by > about 30 seconds, even though we do read the PR_TEST_LINE_SPEED > property before calling Advise.) Is the above a typo? You should read a property on the object *after* you called Advise on that object, not before. -- SvenC
Dmitry Streblechenko wrote: > Not unles you used that advise sink in multiple calls to Advise(). > I noticed that MAPIInitialize is being called without the flag MAPI_MULTITHREAD_NOTIFICATIONS set. From the description of this flag, I am suspicious that this might be the source of my problem. I will set the flag and see what happens. Thanks for your reply Dmitry, Frank
Dmitry Streblechenko wrote: > Not unles you used that advise sink in multiple calls to Advise(). > Revised steps for going "idle": 1. call Unadvise 2. delete the object that services the OnNotify event 3. call MAPIUninitialize 4. receive an OnNotify event (message 1457 decimal) about 30 seconds later and crash I believe the hidden window for receiving OnNotify events does not go away when MAPIUninitialize is called. In any event, it seems the application does not crash when I remove the call to MAPIUninitialize. (MAPIInitialize is being called with the flag MAPI_MULTITHREAD_NOTIFICATIONS.) Thanks, Frank
What kind of application is it? Do you run the message loop? -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "Frank S" <OldGrouch@community.nospam> wrote in message news:uC47YwXqIHA.4672@TK2MSFTNGP05.phx.gbl... > Dmitry Streblechenko wrote: >> Not unles you used that advise sink in multiple calls to Advise(). >> > Revised steps for going "idle": > > 1. call Unadvise > 2. delete the object that services the OnNotify event > 3. call MAPIUninitialize > 4. receive an OnNotify event (message 1457 decimal) about 30 seconds later > and crash > > I believe the hidden window for receiving OnNotify events does not go away > when MAPIUninitialize is called. > > In any event, it seems the application does not crash when I remove the > call to MAPIUninitialize. > > (MAPIInitialize is being called with the flag > MAPI_MULTITHREAD_NOTIFICATIONS.) > > Thanks, > > Frank >
Dmitry Streblechenko wrote: > What kind of application is it? Do you run the message loop? > The application does run a message loop, and is based on CWinApp: class CSystemTrayApp : public CWinApp Most of the time, the only visible piece of the application is an icon in the tray. Regards, Frank
I have never seen that. Doyou have a sample function that exhibits this behavior? -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "Frank S" <OldGrouch@community.nospam> wrote in message news:uI19%23WjqIHA.4808@TK2MSFTNGP04.phx.gbl... > Dmitry Streblechenko wrote: >> What kind of application is it? Do you run the message loop? >> > The application does run a message loop, and is based on CWinApp: > > class CSystemTrayApp : public CWinApp > > Most of the time, the only visible piece of the application is an icon in > the tray. > > Regards, > > Frank >