winehid.sys: Register as a HID minidriver.
Signed-off-by: Aric Stewart <aric@codeweavers.com> Signed-off-by: Sebastian Lackner <sebastian@fds-team.de> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
769cc264e0
commit
45b651e213
|
@ -1,4 +1,5 @@
|
||||||
MODULE = winehid.sys
|
MODULE = winehid.sys
|
||||||
|
IMPORTS = hidclass
|
||||||
EXTRADLLFLAGS = -Wb,--subsystem,native
|
EXTRADLLFLAGS = -Wb,--subsystem,native
|
||||||
|
|
||||||
C_SRCS = \
|
C_SRCS = \
|
||||||
|
|
|
@ -26,13 +26,30 @@
|
||||||
#include "winbase.h"
|
#include "winbase.h"
|
||||||
#include "winternl.h"
|
#include "winternl.h"
|
||||||
#include "ddk/wdm.h"
|
#include "ddk/wdm.h"
|
||||||
|
#include "ddk/hidport.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(hid);
|
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;
|
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);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue