Aric Stewart : winehid.sys: Register as a HID minidriver.
Alexandre Julliard
julliard at winehq.org
Thu Oct 13 14:34:01 CDT 2016
Module: wine
Branch: master
Commit: 45b651e2137a559c1ba26836f1780183529b265d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=45b651e2137a559c1ba26836f1780183529b265d
Author: Aric Stewart <aric at codeweavers.com>
Date: Wed Oct 12 17:46:17 2016 +0200
winehid.sys: Register as a HID minidriver.
Signed-off-by: Aric Stewart <aric at codeweavers.com>
Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/winehid.sys/Makefile.in | 1 +
dlls/winehid.sys/main.c | 19 ++++++++++++++++++-
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/dlls/winehid.sys/Makefile.in b/dlls/winehid.sys/Makefile.in
index d4ca3dd..ad7881e 100644
--- a/dlls/winehid.sys/Makefile.in
+++ b/dlls/winehid.sys/Makefile.in
@@ -1,4 +1,5 @@
MODULE = winehid.sys
+IMPORTS = hidclass
EXTRADLLFLAGS = -Wb,--subsystem,native
C_SRCS = \
diff --git a/dlls/winehid.sys/main.c b/dlls/winehid.sys/main.c
index 7ab9267..cdef3c5 100644
--- a/dlls/winehid.sys/main.c
+++ b/dlls/winehid.sys/main.c
@@ -26,13 +26,30 @@
#include "winbase.h"
#include "winternl.h"
#include "ddk/wdm.h"
+#include "ddk/hidport.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(hid);
+static NTSTATUS WINAPI add_device(DRIVER_OBJECT *driver, DEVICE_OBJECT *device)
+{
+ TRACE("(%p, %p)\n", driver, device);
+ return STATUS_SUCCESS;
+}
+
NTSTATUS WINAPI DriverEntry(DRIVER_OBJECT *driver, UNICODE_STRING *path)
{
+ HID_MINIDRIVER_REGISTRATION registration;
+
TRACE("(%p, %s)\n", driver, debugstr_w(path->Buffer));
- return STATUS_SUCCESS;
+ driver->DriverExtension->AddDevice = add_device;
+
+ memset(®istration, 0, sizeof(registration));
+ registration.DriverObject = driver;
+ registration.RegistryPath = path;
+ registration.DeviceExtensionSize = sizeof(HID_DEVICE_EXTENSION);
+ registration.DevicesArePolled = FALSE;
+
+ return HidRegisterMinidriver(®istration);
}
More information about the wine-cvs
mailing list