aboutsummaryrefslogtreecommitdiffstats
path: root/src/native/addrbook/msoutlook/MsOutlookDll.cxx
diff options
context:
space:
mode:
authorVincent Lucas <chenzo@jitsi.org>2013-03-02 20:30:39 +0000
committerVincent Lucas <chenzo@jitsi.org>2013-03-02 20:30:39 +0000
commit8437c5cc0636009e0e88e3f18e4e2492abcad7e3 (patch)
tree8d7a1eb4def8b1ba4dc74f568ef15acce82b0108 /src/native/addrbook/msoutlook/MsOutlookDll.cxx
parenta1dcd0fcb7291620f665736954113c166eb0feec (diff)
downloadjitsi-8437c5cc0636009e0e88e3f18e4e2492abcad7e3.zip
jitsi-8437c5cc0636009e0e88e3f18e4e2492abcad7e3.tar.gz
jitsi-8437c5cc0636009e0e88e3f18e4e2492abcad7e3.tar.bz2
Applies patch proposed by Ingo Bauersachs for jmsoutlookaddrbook.dkk to lock the MAPI session, correct mixing of char/wchar_t and set to NULL deleted pointers. Removes names (surname, firstname, company name, etc.) from the contact call items. The dll will be generated in the following commit.
Diffstat (limited to 'src/native/addrbook/msoutlook/MsOutlookDll.cxx')
-rw-r--r--src/native/addrbook/msoutlook/MsOutlookDll.cxx28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/native/addrbook/msoutlook/MsOutlookDll.cxx b/src/native/addrbook/msoutlook/MsOutlookDll.cxx
new file mode 100644
index 0000000..c3f10a3
--- /dev/null
+++ b/src/native/addrbook/msoutlook/MsOutlookDll.cxx
@@ -0,0 +1,28 @@
+/*
+ * Jitsi, the OpenSource Java VoIP and Instant Messaging client.
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+
+#include "MsOutlookDll.h"
+#include "MAPISession.h"
+#include <jni.h>
+
+JNIEXPORT BOOL APIENTRY DllMain(
+ HINSTANCE /*hDLL*/,
+ DWORD dwReason,
+ LPVOID /*lpReserved*/)
+{
+ switch (dwReason)
+ {
+ case DLL_PROCESS_ATTACH:
+ MAPISession_initLock();
+ break;
+ case DLL_PROCESS_DETACH:
+ MAPISession_freeLock();
+ break;
+ }
+
+ return TRUE;
+}