diff options
Diffstat (limited to 'src/native/addrbook/msoutlook/MAPISession.cxx')
-rw-r--r-- | src/native/addrbook/msoutlook/MAPISession.cxx | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/native/addrbook/msoutlook/MAPISession.cxx b/src/native/addrbook/msoutlook/MAPISession.cxx index 23b46b4..fb672b4 100644 --- a/src/native/addrbook/msoutlook/MAPISession.cxx +++ b/src/native/addrbook/msoutlook/MAPISession.cxx @@ -7,6 +7,7 @@ #include "MAPISession.h"
static LPMAPISESSION MAPISession_mapiSession = NULL;
+static CRITICAL_SECTION MAPISession_mapiSessionCriticalSection;
/**
* Returns the current mapi session which have been created using the
@@ -31,3 +32,23 @@ void MAPISession_setMapiSession(LPMAPISESSION mapiSession) {
MAPISession_mapiSession = mapiSession;
}
+
+void MAPISession_initLock()
+{
+ InitializeCriticalSection(&MAPISession_mapiSessionCriticalSection);
+}
+
+void MAPISession_lock()
+{
+ EnterCriticalSection(&MAPISession_mapiSessionCriticalSection);
+}
+
+void MAPISession_unlock()
+{
+ LeaveCriticalSection(&MAPISession_mapiSessionCriticalSection);
+}
+
+void MAPISession_freeLock()
+{
+ DeleteCriticalSection(&MAPISession_mapiSessionCriticalSection);
+}
|