Vincent Povirk : wmphoto: Register WMP encoder and decoder classes.

Alexandre Julliard julliard at winehq.org
Thu Aug 24 14:18:25 CDT 2017


Module: wine
Branch: master
Commit: aa7e28497cdba1d0b1eb7aebe07e93a610baa31f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=aa7e28497cdba1d0b1eb7aebe07e93a610baa31f

Author: Vincent Povirk <vincent at codeweavers.com>
Date:   Wed Aug 16 16:08:52 2017 -0500

wmphoto: Register WMP encoder and decoder classes.

Signed-off-by: Vincent Povirk <vincent at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 configure                |  2 +-
 configure.ac             |  2 +-
 dlls/wmphoto/Makefile.in |  2 ++
 dlls/wmphoto/main.c      | 10 ++++++----
 dlls/wmphoto/wmphoto.idl | 42 ++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 52 insertions(+), 6 deletions(-)

diff --git a/configure b/configure
index 1444c48..302087e 100755
--- a/configure
+++ b/configure
@@ -18831,7 +18831,7 @@ wine_fn_config_dll wmiutils enable_wmiutils clean
 wine_fn_config_test dlls/wmiutils/tests wmiutils_test
 wine_fn_config_dll wmp enable_wmp clean
 wine_fn_config_test dlls/wmp/tests wmp_test
-wine_fn_config_dll wmphoto enable_wmphoto
+wine_fn_config_dll wmphoto enable_wmphoto clean
 wine_fn_config_dll wmvcore enable_wmvcore implib
 wine_fn_config_test dlls/wmvcore/tests wmvcore_test
 wine_fn_config_dll wnaspi32 enable_wnaspi32 implib
diff --git a/configure.ac b/configure.ac
index 0a8a89b..9aeaf34 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3612,7 +3612,7 @@ WINE_CONFIG_DLL(wmiutils,,[clean])
 WINE_CONFIG_TEST(dlls/wmiutils/tests)
 WINE_CONFIG_DLL(wmp,,[clean])
 WINE_CONFIG_TEST(dlls/wmp/tests)
-WINE_CONFIG_DLL(wmphoto)
+WINE_CONFIG_DLL(wmphoto,,[clean])
 WINE_CONFIG_DLL(wmvcore,,[implib])
 WINE_CONFIG_TEST(dlls/wmvcore/tests)
 WINE_CONFIG_DLL(wnaspi32,,[implib])
diff --git a/dlls/wmphoto/Makefile.in b/dlls/wmphoto/Makefile.in
index 115de54..d31af33 100644
--- a/dlls/wmphoto/Makefile.in
+++ b/dlls/wmphoto/Makefile.in
@@ -1,3 +1,5 @@
 MODULE = wmphoto.dll
 
 C_SRCS = main.c
+
+IDL_SRCS = wmphoto.idl
diff --git a/dlls/wmphoto/main.c b/dlls/wmphoto/main.c
index 48fd5dc..a92f18b 100644
--- a/dlls/wmphoto/main.c
+++ b/dlls/wmphoto/main.c
@@ -24,16 +24,20 @@
 #include "windef.h"
 #include "winbase.h"
 #include "objbase.h"
+#include "rpcproxy.h"
 
 #include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
 
+static HINSTANCE WMPHOTO_hInstance;
+
 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
 {
     switch (fdwReason)
     {
     case DLL_PROCESS_ATTACH:
+        WMPHOTO_hInstance = hinstDLL;
         DisableThreadLibraryCalls(hinstDLL);
         break;
     case DLL_WINE_PREATTACH:
@@ -56,12 +60,10 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID * ppv)
 
 HRESULT WINAPI DllRegisterServer(void)
 {
-    FIXME("wmphoto: stub\n");
-    return E_NOTIMPL;
+    return __wine_register_resources( WMPHOTO_hInstance );
 }
 
 HRESULT WINAPI DllUnregisterServer(void)
 {
-    FIXME("wmphoto: stub\n");
-    return E_NOTIMPL;
+    return __wine_unregister_resources( WMPHOTO_hInstance );
 }
diff --git a/dlls/wmphoto/wmphoto.idl b/dlls/wmphoto/wmphoto.idl
new file mode 100644
index 0000000..b2a47c1
--- /dev/null
+++ b/dlls/wmphoto/wmphoto.idl
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2017 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
+ */
+
+#pragma makedep register
+
+import "unknwn.idl";
+import "wincodec.idl";
+
+[
+    helpstring("WIC WMP Decoder"),
+    uuid(a26cec36-234c-4950-ae16-e34aace71d0d),
+    threading(both)
+]
+coclass WICWmpDecoder
+{
+    [default] interface IWICBitmapDecoder;
+};
+
+[
+    helpstring("WIC WMP Encoder"),
+    uuid(ac4ce3cb-e1c1-44cd-8215-5a1665509ec2),
+    threading(both)
+]
+coclass WICWmpEncoder
+{
+    [default] interface IWICBitmapEncoder;
+};




More information about the wine-cvs mailing list