--- PyIMsgStore.cpp	2009-01-05 20:43:20.000000000 +0100
+++ PyIMsgStore.cpp.new	2010-06-11 14:21:04.704803000 +0200
@@ -879,6 +879,90 @@
     return _resultobj;
 }
 
+// http://msdn.microsoft.com/en-us/library/cc842238.aspx
+PyObject *PyIMsgStore::Advise(PyObject *self, PyObject *args)
+{
+	// @pyparm string|entryId||The entryID of the object
+	// @pyparm int|mask||
+	// @pyparm <o PyIMAPIAdviseSink>|sink||
+	PyObject *obEntry, *obSink; //obEntry because we can pass None/NULL for entryId
+	int mask;
+	
+	IMsgStore *_swig_self;
+	char *entryString;
+	Py_ssize_t entryStrLen;
+	IMAPIAdviseSink *adviseSink = NULL;
+	unsigned long connection;
+	HRESULT _result;
+	PyObject * _resultobj;
+	
+	if ((_swig_self=GetI(self))==NULL) return NULL;
+	
+	if(!PyArg_ParseTuple(args,"OkO:Advise",&obEntry, &mask, &obSink))
+		return NULL;
+	
+	if (obEntry==Py_None) {
+		entryString = NULL;
+		entryStrLen = 0;
+	} else if PyString_Check(obEntry) {
+		entryString = PyString_AsString(obEntry);
+		entryStrLen = PyString_Size(obEntry);
+	} else {
+		PyErr_SetString(PyExc_TypeError, "EntryID must be a string or None");
+		return NULL;
+	}
+	
+	if (!PyCom_InterfaceFromPyObject(obSink, IID_IMAPIAdviseSink, (void **)&adviseSink, FALSE))
+		return NULL;
+	
+	Py_BEGIN_ALLOW_THREADS
+	_result = _swig_self->Advise(entryStrLen, (LPENTRYID)entryString,
+	                             mask, adviseSink, &connection); 
+	Py_END_ALLOW_THREADS
+	if (FAILED(_result))
+		_resultobj = OleSetOleError(_result);
+	else
+		_resultobj = PyLong_FromUnsignedLong(connection);
+	
+	Py_BEGIN_ALLOW_THREADS
+	adviseSink->Release();
+	Py_END_ALLOW_THREADS
+	
+	return _resultobj;
+}
+
+// http://msdn.microsoft.com/en-us/library/cc765680%28v=office.14%29.aspx
+PyObject *PyIMsgStore::Unadvise(PyObject *self, PyObject *args)
+{
+	// @pyparm int|ulConnection||The connection number associated with an active notification registration
+    unsigned long  ulConnection;
+	
+	IMsgStore *_swig_self;
+	PyObject * _resultobj;
+    HRESULT  _result;
+	
+	if ((_swig_self=GetI(self))==NULL) return NULL;
+	
+	if(!PyArg_ParseTuple(args,"l:Unadvise",&ulConnection)) 
+        return NULL;
+	
+	Py_BEGIN_ALLOW_THREADS
+	_result = (HRESULT)_swig_self->Unadvise(ulConnection);
+	Py_END_ALLOW_THREADS
+	
+	if (FAILED(_result)) {
+		#ifdef SWIG_THIS_IID
+        return PyCom_BuildPyException(_result, _swig_self,  SWIG_THIS_IID);
+		#else
+        return PyCom_BuildPyException(_result);
+		#endif
+    }
+	
+	_resultobj = Py_None;
+	Py_INCREF(Py_None);
+	return _resultobj;
+}
+
 static PyMethodDef IMsgStoreMethods[] = {
 	 { "AbortSubmit", PyIMsgStore::AbortSubmit, 1 },
 	 { "GetLastError", PyIMsgStore::GetLastError, 1 },
@@ -886,6 +970,8 @@
 	 { "GetReceiveFolderTable", PyIMsgStore::GetReceiveFolderTable, 1 },
 	 { "GetReceiveFolder", PyIMsgStore::GetReceiveFolder, 1 },
 	 { "OpenEntry", PyIMsgStore::OpenEntry, 1 },
+	 { "Advise", PyIMsgStore::Advise, 1 },
+	 { "Unadvise", PyIMsgStore::Unadvise, 1 },
 	 { NULL, NULL }
 };
 PyComTypeObject PyIMsgStore::type("PyIMsgStore",	&PyIMAPIProp::type,
@@ -905,4 +991,4 @@
 #endif
   PyWinGlobals_Ensure();
   PyDict_SetItemString(d, "error", PyWinExc_ApiError);
-#endif SWIG_PYTHONCOM
+#endif SWIG_PYTHONCOM
\ No newline at end of file
