Mark Hammond wrote:
>> Forgive my ignorance but those are my first steps with com. Does that
>> mean I should create and register a COM server?
>
> You should create one - you probably don't need to register it.
>
>> Basically I'm trying to reimplement the following code in python:
>>
>> http://www.codeproject.com/internet/CMapiEx.asp
>>
>> Up to now this was straightforward, but at this point I'm stuck.
>
> I can't see anything related to a "sink" on that page - but as a start,

True, I was refering to the code in the zip file on that page. I'll attach MAPISink.h below.

> consider looking at the spambayes package at spambayes.org - there is code
> there that deals with MAPI in various ways.
>

Thank you. I'll have a look at it.

Christian

#ifndef __MAPISINK_H__
#define __MAPISINK_H__

////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// File: MAPISink.h
// Description: MAPI Advise Sink Wrapper
//
// Copyright (C) 2005-2006, Noel Dillabough
//
// This source code is free to use and modify provided this notice remains 
intact and that any enhancements
// or bug fixes are posted to the CodeProject page hosting this class for the 
community to benefit.
//
// Usage: see the Codeproject article at 
http://www.codeproject.com/internet/CMapiEx.asp
//
////////////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////////////
// CMAPISink

class CMAPISink : public IMAPIAdviseSink
{
public:
        CMAPISink(LPNOTIFCALLBACK lpfnCallback,LPVOID lpvContext);

// Attributes
protected:
        LPNOTIFCALLBACK m_lpfnCallback;  
        LPVOID m_lpvContext;  
        LONG m_nRef;  

// IUnknown
public:
        STDMETHOD(QueryInterface)(REFIID riid,LPVOID FAR* ppvObj);
        STDMETHOD_(ULONG, AddRef)();
        STDMETHOD_(ULONG, Release)();

// IMAPIAdviseSink
public:
        STDMETHOD_(ULONG, OnNotify)(ULONG cNotification,LPNOTIFICATION 
lpNotifications);
};  

#endif
_______________________________________________
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to