[PATCH 1/3] dsquery: Add stub DLL.

Zebediah Figura zfigura at codeweavers.com
Mon Jul 31 14:00:01 CDT 2017


Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
 configure                 | 26 +++++---------
 configure.ac              |  1 +
 dlls/dsquery/Makefile.in  |  4 +++
 dlls/dsquery/dsquery.spec | 18 ++++++++++
 dlls/dsquery/main.c       | 87 +++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 118 insertions(+), 18 deletions(-)
 create mode 100644 dlls/dsquery/Makefile.in
 create mode 100644 dlls/dsquery/dsquery.spec
 create mode 100644 dlls/dsquery/main.c

diff --git a/configure b/configure
index 5340523a80a..30eb72320bb 100755
--- a/configure
+++ b/configure
@@ -792,7 +792,6 @@ infodir
 docdir
 oldincludedir
 includedir
-runstatedir
 localstatedir
 sharedstatedir
 sysconfdir
@@ -1182,6 +1181,7 @@ enable_dpvoice
 enable_dpwsockx
 enable_drmclien
 enable_dsound
+enable_dsquery
 enable_dssenh
 enable_dswave
 enable_dwmapi
@@ -1747,7 +1747,6 @@ datadir='${datarootdir}'
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
-runstatedir='${localstatedir}/run'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -2000,15 +1999,6 @@ do
   | -silent | --silent | --silen | --sile | --sil)
     silent=yes ;;
 
-  -runstatedir | --runstatedir | --runstatedi | --runstated \
-  | --runstate | --runstat | --runsta | --runst | --runs \
-  | --run | --ru | --r)
-    ac_prev=runstatedir ;;
-  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
-  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
-  | --run=* | --ru=* | --r=*)
-    runstatedir=$ac_optarg ;;
-
   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
     ac_prev=sbindir ;;
   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -2146,7 +2136,7 @@ fi
 for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
 		datadir sysconfdir sharedstatedir localstatedir includedir \
 		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-		libdir localedir mandir runstatedir
+		libdir localedir mandir
 do
   eval ac_val=\$$ac_var
   # Remove trailing slashes.
@@ -2299,7 +2289,6 @@ Fine tuning of the installation directories:
   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
-  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
   --libdir=DIR            object code libraries [EPREFIX/lib]
   --includedir=DIR        C header files [PREFIX/include]
   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
@@ -6392,7 +6381,7 @@ else
     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     since some C++ compilers masquerading as C compilers
     incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
 		       && LARGE_OFF_T % 2147483647 == 1)
 		      ? 1 : -1];
@@ -6438,7 +6427,7 @@ else
     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     since some C++ compilers masquerading as C compilers
     incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
 		       && LARGE_OFF_T % 2147483647 == 1)
 		      ? 1 : -1];
@@ -6462,7 +6451,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     since some C++ compilers masquerading as C compilers
     incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
 		       && LARGE_OFF_T % 2147483647 == 1)
 		      ? 1 : -1];
@@ -6507,7 +6496,7 @@ else
     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     since some C++ compilers masquerading as C compilers
     incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
 		       && LARGE_OFF_T % 2147483647 == 1)
 		      ? 1 : -1];
@@ -6531,7 +6520,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     since some C++ compilers masquerading as C compilers
     incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
 		       && LARGE_OFF_T % 2147483647 == 1)
 		      ? 1 : -1];
@@ -18309,6 +18298,7 @@ wine_fn_config_dll dpwsockx enable_dpwsockx
 wine_fn_config_dll drmclien enable_drmclien
 wine_fn_config_dll dsound enable_dsound clean,implib
 wine_fn_config_test dlls/dsound/tests dsound_test
+wine_fn_config_dll dsquery enable_dsquery
 wine_fn_config_dll dssenh enable_dssenh
 wine_fn_config_test dlls/dssenh/tests dssenh_test
 wine_fn_config_dll dswave enable_dswave clean
diff --git a/configure.ac b/configure.ac
index 580c37c0cfe..5087c0b7327 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3094,6 +3094,7 @@ WINE_CONFIG_DLL(dpwsockx)
 WINE_CONFIG_DLL(drmclien)
 WINE_CONFIG_DLL(dsound,,[clean,implib])
 WINE_CONFIG_TEST(dlls/dsound/tests)
+WINE_CONFIG_DLL(dsquery)
 WINE_CONFIG_DLL(dssenh)
 WINE_CONFIG_TEST(dlls/dssenh/tests)
 WINE_CONFIG_DLL(dswave,,[clean])
diff --git a/dlls/dsquery/Makefile.in b/dlls/dsquery/Makefile.in
new file mode 100644
index 00000000000..a3f322419a5
--- /dev/null
+++ b/dlls/dsquery/Makefile.in
@@ -0,0 +1,4 @@
+MODULE = dsquery.dll
+
+C_SRCS = \
+	main.c
diff --git a/dlls/dsquery/dsquery.spec b/dlls/dsquery/dsquery.spec
new file mode 100644
index 00000000000..b7002025b21
--- /dev/null
+++ b/dlls/dsquery/dsquery.spec
@@ -0,0 +1,18 @@
+@ stub OpenSavedDsQuery
+@ stub OpenSavedDsQueryW
+@ stub OpenQueryWindow
+@ stdcall -private DllCanUnloadNow()
+@ stdcall -private DllGetClassObject(ptr ptr ptr)
+@ stub DllInstall
+@ stdcall -private DllRegisterServer()
+@ stdcall -private DllUnregisterServer()
+@ stub DSQUERY_512
+@ stub DSQUERY_513
+@ stub DSQUERY_514
+@ stub DSQUERY_515
+@ stub DSQUERY_516
+@ stub DSQUERY_517
+@ stub DSQUERY_518
+@ stub DSQUERY_519
+@ stub DSQUERY_520
+@ stub DSQUERY_521
diff --git a/dlls/dsquery/main.c b/dlls/dsquery/main.c
new file mode 100644
index 00000000000..f316f11fff0
--- /dev/null
+++ b/dlls/dsquery/main.c
@@ -0,0 +1,87 @@
+/*
+ * Copyright 2017 Zebediah Figura 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
+ */
+
+#include "config.h"
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "objbase.h"
+#include "rpcproxy.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(dsquery);
+
+static HINSTANCE instance;
+
+/***********************************************************************
+ *		DllMain
+ */
+BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, void *reserved)
+{
+    TRACE("(%p, %u, %p)\n", inst, reason, reserved);
+
+    switch (reason)
+    {
+        case DLL_WINE_PREATTACH:
+            return FALSE;    /* prefer native version */
+        case DLL_PROCESS_ATTACH:
+            instance = inst;
+            DisableThreadLibraryCalls(inst);
+            break;
+    }
+
+    return TRUE;
+}
+
+/***********************************************************************
+ *		DllCanUnloadNow (DSQUERY.@)
+ */
+HRESULT WINAPI DllCanUnloadNow(void)
+{
+    return S_FALSE;
+}
+
+/***********************************************************************
+ *		DllGetClassObject (DSQUERY.@)
+ */
+HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **out)
+{
+    TRACE("rclsid %s, riid %s, out %p\n", debugstr_guid(rclsid), debugstr_guid(riid), out);
+
+    FIXME("%s: no class found\n", debugstr_guid(rclsid));
+    *out = NULL;
+    return CLASS_E_CLASSNOTAVAILABLE;
+}
+
+/***********************************************************************
+ *		DllRegisterServer (DSQUERY.@)
+ */
+HRESULT WINAPI DllRegisterServer(void)
+{
+    return __wine_register_resources( instance );
+}
+
+/***********************************************************************
+ *		DllUnregisterServer (DSQUERY.@)
+ */
+HRESULT WINAPI DllUnregisterServer(void)
+{
+    return __wine_unregister_resources( instance );
+}
-- 
2.13.3




More information about the wine-patches mailing list