winusb: add new stub dll

Laszlo Kaszonyi laszlo.kaszonyi.dev at gmail.com
Thu Aug 25 17:39:17 CDT 2011


---
 configure.ac              |    1 +
 dlls/winusb/Makefile.in   |    7 ++++++
 dlls/winusb/winusb.spec   |   22 +++++++++++++++++++++
 dlls/winusb/winusb_main.c |   47 +++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 77 insertions(+), 0 deletions(-)
 create mode 100644 dlls/winusb/Makefile.in
 create mode 100644 dlls/winusb/winusb.spec
 create mode 100644 dlls/winusb/winusb_main.c

diff --git a/configure.ac b/configure.ac
index ae89108..a7b474f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2867,6 +2867,7 @@ WINE_CONFIG_DLL(wintab32,,[implib])
 WINE_CONFIG_TEST(dlls/wintab32/tests)
 WINE_CONFIG_DLL(wintrust,,[implib])
 WINE_CONFIG_TEST(dlls/wintrust/tests)
+WINE_CONFIG_DLL(winusb)
 WINE_CONFIG_DLL(wlanapi)
 WINE_CONFIG_DLL(wldap32,,[implib,po])
 WINE_CONFIG_TEST(dlls/wldap32/tests)
diff --git a/dlls/winusb/Makefile.in b/dlls/winusb/Makefile.in
new file mode 100644
index 0000000..666b4e6
--- /dev/null
+++ b/dlls/winusb/Makefile.in
@@ -0,0 +1,7 @@
+MODULE    = winusb.dll
+
+C_SRCS = \
+	winusb_main.c
+
+ at MAKE_DLL_RULES@
+
diff --git a/dlls/winusb/winusb.spec b/dlls/winusb/winusb.spec
new file mode 100644
index 0000000..09371e9
--- /dev/null
+++ b/dlls/winusb/winusb.spec
@@ -0,0 +1,22 @@
+@ stub WinUsb_AbortPipe
+@ stub WinUsb_ControlTransfer
+@ stub WinUsb_FlushPipe
+@ stub WinUsb_Free
+@ stub WinUsb_GetAssociatedInterface
+@ stub WinUsb_GetCurrentAlternateSetting
+@ stub WinUsb_GetDescriptor
+@ stub WinUsb_GetOverlappedResult
+@ stub WinUsb_GetPipePolicy
+@ stub WinUsb_GetPowerPolicy
+@ stub WinUsb_Initialize
+@ stub WinUsb_ParseConfigurationDescriptor
+@ stub WinUsb_ParseDescriptors
+@ stub WinUsb_QueryDeviceInformation
+@ stub WinUsb_QueryInterfaceSettings
+@ stub WinUsb_QueryPipe
+@ stub WinUsb_ReadPipe
+@ stub WinUsb_ResetPipe
+@ stub WinUsb_SetCurrentAlternateSetting
+@ stub WinUsb_SetPipePolicy
+@ stub WinUsb_SetPowerPolicy
+@ stub WinUsb_WritePipe
diff --git a/dlls/winusb/winusb_main.c b/dlls/winusb/winusb_main.c
new file mode 100644
index 0000000..f237c68
--- /dev/null
+++ b/dlls/winusb/winusb_main.c
@@ -0,0 +1,47 @@
+/*
+ * winusb.dll Implementation
+ *
+ * Copyright 2011 Laszlo Kaszonyi
+ *
+ * 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(winusb);
+
+BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
+{
+    TRACE("(0x%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;
+}
-- 
1.7.4.1


--------------020608020907010808010402--



More information about the wine-patches mailing list