Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Tue, 22 Apr 2008 17:28:34 -0500,    group: microsoft.public.platformsdk.mapi        back       


IMAPIAdviseSink question   
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
date: Tue, 22 Apr 2008 17:28:34 -0500   author:   Frank S am

Re: IMAPIAdviseSink question   
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
date: Tue, 22 Apr 2008 17:00:30 -0700   author:   Dmitry Streblechenko

Re: IMAPIAdviseSink question   
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
date: Wed, 23 Apr 2008 08:57:23 +0200   author:   SvenC am

Re: IMAPIAdviseSink question   
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
date: Wed, 23 Apr 2008 09:04:36 -0500   author:   Frank S am

Re: IMAPIAdviseSink question   
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
date: Mon, 28 Apr 2008 17:06:20 -0500   author:   Frank S am

Re: IMAPIAdviseSink question   
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
>
date: Tue, 29 Apr 2008 10:30:27 -0700   author:   Dmitry Streblechenko

Re: IMAPIAdviseSink question   
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
>
date: Tue, 29 Apr 2008 10:31:13 -0700   author:   Dmitry Streblechenko

Re: IMAPIAdviseSink question   
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
date: Tue, 29 Apr 2008 15:15:17 -0500   author:   Frank S am

Re: IMAPIAdviseSink question   
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
>
date: Tue, 29 Apr 2008 14:30:41 -0700   author:   Dmitry Streblechenko

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us