[2/5] propsys: Register CLSID_InMemoryPropertyStore.

Vincent Povirk madewokherd at gmail.com
Tue May 22 15:51:52 CDT 2012


-------------- next part --------------
From 4406aa4bed92276c7f7dba87d266d5c2d238f6d8 Mon Sep 17 00:00:00 2001
From: Vincent Povirk <vincent at codeweavers.com>
Date: Tue, 22 May 2012 11:17:29 -0500
Subject: [PATCH 02/10] propsys: Register CLSID_InMemoryPropertyStore.

---
 dlls/propsys/Makefile.in         |    2 ++
 dlls/propsys/propsys.spec        |    4 ++--
 dlls/propsys/propsys_classes.idl |   26 ++++++++++++++++++++++++++
 dlls/propsys/propsys_main.c      |   15 +++++++++++++++
 tools/wine.inf.in                |    1 +
 5 files changed, 46 insertions(+), 2 deletions(-)
 create mode 100644 dlls/propsys/propsys_classes.idl

diff --git a/dlls/propsys/Makefile.in b/dlls/propsys/Makefile.in
index 1cbbe7c..10d2013 100644
--- a/dlls/propsys/Makefile.in
+++ b/dlls/propsys/Makefile.in
@@ -6,4 +6,6 @@ C_SRCS = \
 	propsys_main.c \
 	propvar.c
 
+IDL_R_SRCS = propsys_classes.idl
+
 @MAKE_DLL_RULES@
diff --git a/dlls/propsys/propsys.spec b/dlls/propsys/propsys.spec
index 4b617ea..11b1397 100644
--- a/dlls/propsys/propsys.spec
+++ b/dlls/propsys/propsys.spec
@@ -25,8 +25,8 @@
 @ stub ClearVariantArray
 @ stub DllCanUnloadNow
 @ stub DllGetClassObject
-@ stub DllRegisterServer
-@ stub DllUnregisterServer
+@ stdcall -private DllRegisterServer()
+@ stdcall -private DllUnregisterServer()
 @ stub InitPropVariantFromBooleanVector
 @ stdcall InitPropVariantFromBuffer(ptr long ptr)
 @ stub InitPropVariantFromCLSID
diff --git a/dlls/propsys/propsys_classes.idl b/dlls/propsys/propsys_classes.idl
new file mode 100644
index 0000000..c747d58
--- /dev/null
+++ b/dlls/propsys/propsys_classes.idl
@@ -0,0 +1,26 @@
+/*
+ * Coclasses for propsys
+ *
+ * Copyright 2012 Vincent Povirk for CodeWeavers
+ *
+ * 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
+ */
+
+[
+    threading(both),
+    uuid(9a02e012-6303-4e1e-b9a1-630f802592c5)
+]
+coclass InMemoryPropertyStore { interface IPropertyStoreCache; }
+
diff --git a/dlls/propsys/propsys_main.c b/dlls/propsys/propsys_main.c
index 3c2c3ed..e2da0a1 100644
--- a/dlls/propsys/propsys_main.c
+++ b/dlls/propsys/propsys_main.c
@@ -26,12 +26,15 @@
 #include "windef.h"
 #include "winbase.h"
 #include "objbase.h"
+#include "rpcproxy.h"
 #include "propsys.h"
 #include "wine/debug.h"
 #include "wine/unicode.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(propsys);
 
+static HINSTANCE propsys_hInstance;
+
 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
 {
     TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved);
@@ -41,9 +44,11 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
         case DLL_WINE_PREATTACH:
             return FALSE;    /* prefer native version */
         case DLL_PROCESS_ATTACH:
+            propsys_hInstance = hinstDLL;
             DisableThreadLibraryCalls(hinstDLL);
             break;
         case DLL_PROCESS_DETACH:
+            propsys_hInstance = 0;
             break;
         default:
             break;
@@ -52,6 +57,16 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
     return TRUE;
 }
 
+HRESULT WINAPI DllRegisterServer(void)
+{
+    return __wine_register_resources( propsys_hInstance );
+}
+
+HRESULT WINAPI DllUnregisterServer(void)
+{
+    return __wine_unregister_resources( propsys_hInstance );
+}
+
 HRESULT WINAPI PSRegisterPropertySchema(PCWSTR path)
 {
     FIXME("%s stub\n", debugstr_w(path));
diff --git a/tools/wine.inf.in b/tools/wine.inf.in
index abd5307..b73f720 100644
--- a/tools/wine.inf.in
+++ b/tools/wine.inf.in
@@ -2506,6 +2506,7 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G"
 11,,devenum.dll,1
 11,,mshtml.dll,1
 11,,msisip.dll,1
+11,,propsys.dll,1
 11,,qcap.dll,1
 11,,urlmon.dll,1
 11,,windowscodecs.dll,1
-- 
1.7.9.5


More information about the wine-patches mailing list