On 4/10/20 10:01 AM, Vijay Kiran Kamuju wrote:
From f9c6605f27f0c12d530b26b558e3d9a59c598028 Mon Sep 17 00:00:00 2001 From: Vijay Kiran Kamuju infyquest@gmail.com Date: Fri, 10 Apr 2020 16:08:57 +0200 Subject: [PATCH v2] qdvd: add stub dll
based on patch from Austin English
Signed-off-by: Vijay Kiran Kamuju infyquest@gmail.com
configure | 2 ++ configure.ac | 1 + dlls/qdvd/Makefile.in | 6 ++++ dlls/qdvd/qdvd.spec | 4 +++ dlls/qdvd/qdvd_main.c | 65 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 78 insertions(+) create mode 100644 dlls/qdvd/Makefile.in create mode 100644 dlls/qdvd/qdvd.spec create mode 100644 dlls/qdvd/qdvd_main.c
diff --git a/configure b/configure index 7a47e0ff60..7a3d16afac 100755 --- a/configure +++ b/configure @@ -1523,6 +1523,7 @@ enable_psapi enable_pstorec enable_qasf enable_qcap +enable_qdvd enable_qedit enable_qmgr enable_qmgrprxy @@ -20803,6 +20804,7 @@ wine_fn_config_makefile dlls/qasf enable_qasf wine_fn_config_makefile dlls/qasf/tests enable_tests wine_fn_config_makefile dlls/qcap enable_qcap wine_fn_config_makefile dlls/qcap/tests enable_tests +wine_fn_config_makefile dlls/qdvd enable_qdvd wine_fn_config_makefile dlls/qedit enable_qedit wine_fn_config_makefile dlls/qedit/tests enable_tests wine_fn_config_makefile dlls/qmgr enable_qmgr diff --git a/configure.ac b/configure.ac index fb775d7a73..e811478d4f 100644 --- a/configure.ac +++ b/configure.ac @@ -3582,6 +3582,7 @@ WINE_CONFIG_MAKEFILE(dlls/qasf) WINE_CONFIG_MAKEFILE(dlls/qasf/tests) WINE_CONFIG_MAKEFILE(dlls/qcap) WINE_CONFIG_MAKEFILE(dlls/qcap/tests) +WINE_CONFIG_MAKEFILE(dlls/qdvd) WINE_CONFIG_MAKEFILE(dlls/qedit) WINE_CONFIG_MAKEFILE(dlls/qedit/tests) WINE_CONFIG_MAKEFILE(dlls/qmgr) diff --git a/dlls/qdvd/Makefile.in b/dlls/qdvd/Makefile.in new file mode 100644 index 0000000000..c4b7dcce1f --- /dev/null +++ b/dlls/qdvd/Makefile.in @@ -0,0 +1,6 @@ +MODULE = qdvd.dll
+EXTRADLLFLAGS = -mno-cygwin
+C_SRCS = \
- qdvd_main.c
diff --git a/dlls/qdvd/qdvd.spec b/dlls/qdvd/qdvd.spec new file mode 100644 index 0000000000..85103d692e --- /dev/null +++ b/dlls/qdvd/qdvd.spec @@ -0,0 +1,4 @@ +@ stdcall -private DllCanUnloadNow() +@ stdcall -private DllGetClassObject(ptr ptr ptr) +3 stub DllRegisterServer +4 stub DllUnregisterServer
I don't think these need to be ordinals.
diff --git a/dlls/qdvd/qdvd_main.c b/dlls/qdvd/qdvd_main.c new file mode 100644 index 0000000000..39ab3d7261 --- /dev/null +++ b/dlls/qdvd/qdvd_main.c @@ -0,0 +1,65 @@ +/*
- Copyright 2009 Austin English
- 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
- */
+#include "config.h"
As Marvin has already complained, you don't use config.h in DLLs compiled with msvcrt.
+#include <stdarg.h>
+#include "windef.h" +#include "winbase.h" +#include "wine/debug.h"
+WINE_DEFAULT_DEBUG_CHANNEL(qdvd);
+LONG dll_ref = 0;
+BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +{
Stray newline.
- switch (fdwReason)
- {
case DLL_WINE_PREATTACH:
return FALSE; /* prefer native version */
case DLL_PROCESS_ATTACH:
/* FIXME: Initialization */
What initialization do you imagine qdvd will need?
DisableThreadLibraryCalls(hinstDLL);
break;
- }
- return TRUE;
+}
+/***********************************************************************
DllGetClassObject
- */
+HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) +{
- FIXME("(%s %s %p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
- return CLASS_E_CLASSNOTAVAILABLE;
+}
+/***********************************************************************
DllCanUnloadNow
- */
+HRESULT WINAPI DllCanUnloadNow(void) +{
- return dll_ref != 0 ? S_FALSE : S_OK;
+}
I won't object heavily to COM DLL refcounting, though it's generally not necessary.
-- 2.26.0