[python-win32] PyIMAPISession && IID_IMAPIAdviseSink

Arn Vollebregt arn.vollebregt at xs4all.nl
Thu Jun 10 12:25:38 CEST 2010


I have made an attempt at implementing the Advise function for
PyIMsgStore, as you will find attached. However, following the trend
thusfar, onNotify() still is not called. Am I on the wrong path here, or
am I still missing something?

Regards,

Arn Vollebregt

P.S.: In my previous email I was claiming the Advise function should also
be available for PyIMAPIFolder, but this is not the case:
http://msdn.microsoft.com/en-us/library/bb159903.aspx

> Ah, I found out why the fnevNewMail event doesnt fire: Advise is only
> implemented for PyIMAPISession and PyIMAPITable, and not (for example) for
> PyIMsgStore and PyIMAPIFolder. The later are the only objects which
> receive fnevNewMail: http://msdn.microsoft.com/en-us/library/cc840027.aspx
>
> Will this by any chance be implemented in the near future? Reading C++ is
> one thing, but I doubt I'll be able to implement this myself. It looks to
> me like a simple copy/paste action isnt going to cut it, going by the code
> (difference) in PyIMAPISession.cpp and PyIMAPITable.cpp
>
> Regards,
>
> Arn Vollebregt
>
>> I'd suggest looking for some C++ code which manages to hook that event
>> as a point of comparison for what magic needs to be done to make things
>> work.
>>
>> Mark
>>
>> On 8/06/2010 12:53 AM, Arn Vollebregt wrote:
>>> Hi,
>>>
>>> A while ago I asked a question[1] about hooking MAPI events in Outlook.
>>> Although this question was answered[2] back then, I am afraid I am
>>> still
>>> stuck on the subject: It seems I have been able to hook the AdviseSink,
>>> but the onNotify() never fires. However, the fnevNewMail[3] event is
>>> seen
>>> by OutlookSpy[4] in the IMsgStore::Advise() tab on the folder in
>>> question,
>>> so I must be doing something wrong.
>>>
>>> I have attached my example code, and would appreciate any pointers on
>>> the
>>> subject.
>>>
>>> Regards,
>>>
>>> Arn Vollebregt
>>>
>>> [1]
>>> http://mail.python.org/pipermail/python-win32/2009-August/009503.html
>>> [2]
>>> http://mail.python.org/pipermail/python-win32/2009-August/009504.html
>>> [3] http://msdn.microsoft.com/en-us/library/cc765897.aspx
>>> [4] http://www.dimastr.com/outspy/
>>>
>>>
>>>
>>> _______________________________________________
>>> python-win32 mailing list
>>> python-win32 at python.org
>>> http://mail.python.org/mailman/listinfo/python-win32
>>
>>
>
> _______________________________________________
> python-win32 mailing list
> python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: hook.py
URL: <http://mail.python.org/pipermail/python-win32/attachments/20100610/ce997491/attachment-0002.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: PyIMsgStore.cpp
URL: <http://mail.python.org/pipermail/python-win32/attachments/20100610/ce997491/attachment-0003.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: PyIMsgStore.h
URL: <http://mail.python.org/pipermail/python-win32/attachments/20100610/ce997491/attachment-0001.h>


More information about the python-win32 mailing list