diff --git a/com/win32comext/mapi/src/PyIMsgStore.i b/com/win32comext/mapi/src/PyIMsgStore.i index ddb43229a..a78fb9380 100644 --- a/com/win32comext/mapi/src/PyIMsgStore.i +++ b/com/win32comext/mapi/src/PyIMsgStore.i @@ -79,6 +79,32 @@ PyObject *PyIMsgStore::OpenEntry(PyObject *self, PyObject *args) %} +%native(StoreLogoff) StoreLogoff; +%{ +// @pyswig |StoreLogoff|Enables the orderly logoff of the message store. +PyObject *PyIMsgStore::StoreLogoff(PyObject *self, PyObject *args) +{ + HRESULT _result; + unsigned long flags; + + IMsgStore *_swig_self; + if ((_swig_self=GetI(self))==NULL) return NULL; + // @pyparm int|flags||Bitmask of flags that controls how the message store is closed. + if(!PyArg_ParseTuple(args,"k:StoreLogoff", &flags)) + return NULL; + + Py_BEGIN_ALLOW_THREADS + _result = (HRESULT )_swig_self->StoreLogoff(&flags); + Py_END_ALLOW_THREADS + if (FAILED(_result)) { + return OleSetOleError(_result); + } + + return PyLong_FromLong(flags); +} + +%} + %native(GetReceiveFolder) GetReceiveFolder; %{ // @pyswig , string|GetReceiveFolder|Obtains the folder that was established as the destination for incoming messages of a specified message class or the default receive folder for the message store. diff --git a/com/win32comext/mapi/src/mapi.i b/com/win32comext/mapi/src/mapi.i index 6e769b7f4..fae114b43 100644 --- a/com/win32comext/mapi/src/mapi.i +++ b/com/win32comext/mapi/src/mapi.i @@ -269,6 +269,16 @@ static PyObject *PyMAPIUninitialize(PyObject *self, PyObject *args) #define MAPI_BEST_ACCESS MAPI_BEST_ACCESS #define MAPI_MODIFY MAPI_MODIFY +#define LOGOFF_NO_WAIT LOGOFF_NO_WAIT +#define LOGOFF_ORDERLY LOGOFF_ORDERLY +#define LOGOFF_PURGE LOGOFF_PURGE +#define LOGOFF_ABORT LOGOFF_ABORT +#define LOGOFF_QUIET LOGOFF_QUIET +#define LOGOFF_COMPLETE LOGOFF_COMPLETE +#define LOGOFF_INBOUND LOGOFF_INBOUND +#define LOGOFF_OUTBOUND LOGOFF_OUTBOUND +#define LOGOFF_OUTBOUND_QUEUE LOGOFF_OUTBOUND_QUEUE + #define MAPI_DEFERRED_ERRORS MAPI_DEFERRED_ERRORS // Allows a method to return successfully, possibly before the changes have been fully committed. #define MAPI_INIT_VERSION MAPI_INIT_VERSION