diff --git a/dlls/winehid.sys/Makefile.in b/dlls/winehid.sys/Makefile.in index d4ca3dd3f18..ad7881e978a 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 7ab92679fd1..cdef3c5c23c 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); -NTSTATUS WINAPI DriverEntry(DRIVER_OBJECT *driver, UNICODE_STRING *path) +static NTSTATUS WINAPI add_device(DRIVER_OBJECT *driver, DEVICE_OBJECT *device) { - TRACE("(%p, %s)\n", driver, debugstr_w(path->Buffer)); - + 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)); + + 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); +}