From: Vijay Kiran Kamuju Subject: [PATCH V2] qdvd: Register DvdGraphBuilder class. Message-Id: Date: Fri, 26 Jun 2020 20:37:51 +0200 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49458 Signed-off-by: Vijay Kiran Kamuju From a55d619de2ce083de798d57f0be61d46fe5d09c3 Mon Sep 17 00:00:00 2001 From: Vijay Kiran Kamuju Date: Fri, 26 Jun 2020 20:02:10 +0200 Subject: [PATCH V2] qdvd: Register DvdGraphBuilder class. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49458 Signed-off-by: Vijay Kiran Kamuju --- dlls/qdvd/Makefile.in | 3 +++ dlls/qdvd/qdvd.spec | 4 ++-- dlls/qdvd/qdvd_classes.idl | 28 ++++++++++++++++++++++++++++ dlls/qdvd/qdvd_main.c | 27 +++++++++++++++++++++++---- 4 files changed, 56 insertions(+), 6 deletions(-) create mode 100644 dlls/qdvd/qdvd_classes.idl diff --git a/dlls/qdvd/Makefile.in b/dlls/qdvd/Makefile.in index c4b7dcce1f..b3b13486ed 100644 --- a/dlls/qdvd/Makefile.in +++ b/dlls/qdvd/Makefile.in @@ -4,3 +4,6 @@ EXTRADLLFLAGS = -mno-cygwin C_SRCS = \ qdvd_main.c + +IDL_SRCS = \ + qdvd_classes.idl diff --git a/dlls/qdvd/qdvd.spec b/dlls/qdvd/qdvd.spec index c534b4fbf4..b16365d0c9 100644 --- a/dlls/qdvd/qdvd.spec +++ b/dlls/qdvd/qdvd.spec @@ -1,4 +1,4 @@ @ stdcall -private DllCanUnloadNow() @ stdcall -private DllGetClassObject(ptr ptr ptr) -@ stub DllRegisterServer -@ stub DllUnregisterServer +@ stdcall -private DllRegisterServer() +@ stdcall -private DllUnregisterServer() diff --git a/dlls/qdvd/qdvd_classes.idl b/dlls/qdvd/qdvd_classes.idl new file mode 100644 index 0000000000..b22429d99e --- /dev/null +++ b/dlls/qdvd/qdvd_classes.idl @@ -0,0 +1,28 @@ +/* + * COM classes for qdvd + * + * Copyright 2020 Vijay Kiran Kamuju + * + * 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 + +[ + helpstring("DVD Graph Builder"), + threading(both), + uuid(fcc152b7-f372-11d0-8e00-00c04fd7c08b) +] +coclass DvdGraphBuilder {} diff --git a/dlls/qdvd/qdvd_main.c b/dlls/qdvd/qdvd_main.c index 5c7368ce90..2c82d8f5ce 100644 --- a/dlls/qdvd/qdvd_main.c +++ b/dlls/qdvd/qdvd_main.c @@ -21,17 +21,26 @@ #include #include "windef.h" #include "winbase.h" +#include "oleidl.h" +#include "rpcproxy.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(qdvd); +static HINSTANCE qdvd_instance; + BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved) { - if (reason == DLL_WINE_PREATTACH) - return FALSE; /* prefer native version */ + switch (reason) + { + case DLL_WINE_PREATTACH: + return FALSE; /* prefer native version */ + case DLL_PROCESS_ATTACH: + qdvd_instance = instance; + DisableThreadLibraryCalls(instance); + break; + } - if (reason == DLL_PROCESS_ATTACH) - DisableThreadLibraryCalls(instance); return TRUE; } @@ -41,6 +50,16 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out) return CLASS_E_CLASSNOTAVAILABLE; } +HRESULT WINAPI DllRegisterServer(void) +{ + return __wine_register_resources( qdvd_instance ); +} + +HRESULT WINAPI DllUnregisterServer(void) +{ + return __wine_unregister_resources( qdvd_instance ); +} + HRESULT WINAPI DllCanUnloadNow(void) { return S_FALSE; -- 2.27.0