[PATCH] qmgr: Skeleton implementation of Background Intelligent Transfer Service (BITS)

Roy Shea roy at cs.hmc.edu
Mon Oct 8 12:38:06 CDT 2007


Resubmission of BITS that now correctly generates a "qmgr.dll".
Current versions of MS Windows use the "qmgr.dll" name for backwards
compatibility, despite general migration to the BITS name used for the
distributed IDL / header files / documentation.

Peace,
-Roy

-------------- next part --------------
 dlls/qmgr/Makefile.in |   14 ++++++++++++++
 dlls/qmgr/bits_main.c |   49 +++++++++++++++++++++++++++++++++++++++++++++++++
 dlls/qmgr/qmgr.spec   |    4 ++++
 3 files changed, 67 insertions(+), 0 deletions(-)
 create mode 100644 dlls/qmgr/Makefile.in
 create mode 100644 dlls/qmgr/bits_main.c
 create mode 100644 dlls/qmgr/qmgr.spec

diff --git a/dlls/qmgr/Makefile.in b/dlls/qmgr/Makefile.in
new file mode 100644
index 0000000..24dc03b
--- /dev/null
+++ b/dlls/qmgr/Makefile.in
@@ -0,0 +1,14 @@
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ../..
+SRCDIR    = @srcdir@
+VPATH     = @srcdir@
+MODULE    = qmgr.dll
+IMPORTS   = kernel32
+EXTRALIBS =
+
+C_SRCS = \
+	bits_main.c
+
+ at MAKE_DLL_RULES@
+
+ at DEPENDENCIES@  # everything below this line is overwritten by make depend
diff --git a/dlls/qmgr/bits_main.c b/dlls/qmgr/bits_main.c
new file mode 100644
index 0000000..76321ca
--- /dev/null
+++ b/dlls/qmgr/bits_main.c
@@ -0,0 +1,49 @@
+/*
+ * Implementation of qmgr.dll
+ *
+ * Background Intelligent Transfer Service (BITS) interface.  Dll is named
+ * qmgr for backwards compatibility with early versions of BITS.
+ *
+ * Copyright 2007 Google (Roy Shea)
+ *
+ * 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 <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "wine/debug.h"
+#include "objbase.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(bits);
+
+BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
+{
+    TRACE("(%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved);
+
+    switch (fdwReason)
+    {
+    case DLL_WINE_PREATTACH:
+        return FALSE;  /* prefer native version */
+    case DLL_PROCESS_ATTACH:
+        DisableThreadLibraryCalls(hinstDLL);
+        break;
+    case DLL_PROCESS_DETACH:
+        break;
+    }
+
+    return TRUE;
+}
diff --git a/dlls/qmgr/qmgr.spec b/dlls/qmgr/qmgr.spec
new file mode 100644
index 0000000..c5fc87a
--- /dev/null
+++ b/dlls/qmgr/qmgr.spec
@@ -0,0 +1,4 @@
+@ stub DllCanUnloadNow
+@ stub DllGetClassObject
+@ stub DllRegisterServer
+@ stub DllUnregisterServer
-- 
1.5.3.1



More information about the wine-patches mailing list