[PATCH 2/2] mtxdm: Implement GetDispenserManager

Alistair Leslie-Hughes leslie_alistair at hotmail.com
Sun Apr 9 22:59:55 CDT 2017


Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
 dlls/mtxdm/Makefile.in  |  2 +-
 dlls/mtxdm/mtxdm.spec   |  2 +-
 dlls/mtxdm/mtxdm_main.c | 20 +++++++-------------
 include/Makefile.in     |  1 +
 include/mtxdm.h         | 34 ++++++++++++++++++++++++++++++++++
 5 files changed, 44 insertions(+), 15 deletions(-)
 create mode 100644 include/mtxdm.h

diff --git a/dlls/mtxdm/Makefile.in b/dlls/mtxdm/Makefile.in
index 074dcfd..63a99b6 100644
--- a/dlls/mtxdm/Makefile.in
+++ b/dlls/mtxdm/Makefile.in
@@ -1,5 +1,5 @@
 MODULE    = mtxdm.dll
-
+IMPORTS   = uuid ole32
 
 C_SRCS = \
 	mtxdm_main.c
diff --git a/dlls/mtxdm/mtxdm.spec b/dlls/mtxdm/mtxdm.spec
index 9cff0d9..4aad62f 100644
--- a/dlls/mtxdm/mtxdm.spec
+++ b/dlls/mtxdm/mtxdm.spec
@@ -1 +1 @@
-@ stub GetDispenserManager
+@ cdecl GetDispenserManager(ptr)
diff --git a/dlls/mtxdm/mtxdm_main.c b/dlls/mtxdm/mtxdm_main.c
index d859571..75020fe 100644
--- a/dlls/mtxdm/mtxdm_main.c
+++ b/dlls/mtxdm/mtxdm_main.c
@@ -22,22 +22,16 @@
 
 #include "windef.h"
 #include "winbase.h"
+#include "comsvcs.h"
 #include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(comsvcs);
 
-BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
+
+HRESULT CDECL GetDispenserManager(IDispenserManager **dispenser)
 {
-    TRACE("(%p, %u, %p)\n", instance, reason, reserved);
-
-    switch (reason)
-    {
-        case DLL_WINE_PREATTACH:
-            return FALSE;    /* prefer native version */
-        case DLL_PROCESS_ATTACH:
-            DisableThreadLibraryCalls(instance);
-            break;
-    }
-
-    return TRUE;
+    TRACE("%p\n", dispenser);
+
+    return CoCreateInstance( &CLSID_DispenserManager, NULL, CLSCTX_ALL, &IID_IDispenserManager, (void**)&dispenser);
 }
+
diff --git a/include/Makefile.in b/include/Makefile.in
index 2384c93..f9cb7b4 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -513,6 +513,7 @@ HEADER_SRCS = \
 	msxml2did.h \
 	msxml6did.h \
 	msxmldid.h \
+	mtxdm.h \
 	nb30.h \
 	ncrypt.h \
 	ndrtypes.h \
diff --git a/include/mtxdm.h b/include/mtxdm.h
new file mode 100644
index 0000000..94098ea
--- /dev/null
+++ b/include/mtxdm.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2017 Alistair Leslie-Hughes
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+#ifndef __MTXDM_H__
+#define __MTXDM_H__
+
+#include "comsvcs.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+HRESULT CDECL GetDispenserManager(IDispenserManager**);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif
-- 
1.9.1




More information about the wine-patches mailing list