qdvd: add stub dll

Austin English austinenglish at gmail.com
Thu Apr 16 18:35:42 CDT 2009


Goes partway toward fixing bug 18072.

-- 
-Austin
-------------- next part --------------
diff --git a/configure.ac b/configure.ac
index f156bbe..bb7cc7b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2147,6 +2147,7 @@ WINE_CONFIG_MAKEFILE([dlls/psapi/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_
 WINE_CONFIG_MAKEFILE([dlls/psapi/tests/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS],[enable_tests])
 WINE_CONFIG_MAKEFILE([dlls/pstorec/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
 WINE_CONFIG_MAKEFILE([dlls/qcap/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
+WINE_CONFIG_MAKEFILE([dlls/qdvd/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
 WINE_CONFIG_MAKEFILE([dlls/qedit/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
 WINE_CONFIG_MAKEFILE([dlls/qedit/tests/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS],[enable_tests])
 WINE_CONFIG_MAKEFILE([dlls/qmgr/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
diff --git a/dlls/qdvd/Makefile.in b/dlls/qdvd/Makefile.in
new file mode 100644
index 0000000..0c56757
--- /dev/null
+++ b/dlls/qdvd/Makefile.in
@@ -0,0 +1,13 @@
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ../..
+SRCDIR    = @srcdir@
+VPATH     = @srcdir@
+MODULE    = qdvd.dll
+IMPORTS   = kernel32
+
+C_SRCS = \
+	qdvd_main.c
+
+ at MAKE_DLL_RULES@
+
+ at DEPENDENCIES@  # everything below this line is overwritten by make depend
diff --git a/dlls/qdvd/qdvd.spec b/dlls/qdvd/qdvd.spec
new file mode 100644
index 0000000..85103d6
--- /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
diff --git a/dlls/qdvd/qdvd_main.c b/dlls/qdvd/qdvd_main.c
new file mode 100644
index 0000000..d9f42c1
--- /dev/null
+++ b/dlls/qdvd/qdvd_main.c
@@ -0,0 +1,72 @@
+/*
+ * 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"
+
+#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)
+{
+
+	switch (fdwReason)
+	{
+		case DLL_WINE_PREATTACH:
+			return FALSE;    /* prefer native version */
+		case DLL_PROCESS_ATTACH:
+			/* FIXME: Initialization */
+			DisableThreadLibraryCalls(hinstDLL);
+			break;
+			break;
+		case DLL_PROCESS_DETACH:
+			break;
+		default:
+			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;
+}
+
+
-- 
1.6.0.4


More information about the wine-patches mailing list