* PROGRAMMER: Hervé Poussineau (hpoussin@reactos.org)
*/
-#include "usetup.h"
+#include <usetup.h>
#define NDEBUG
#include <debug.h>
-#define INITGUID
-#include <guiddef.h>
-#include <libs/umpnpmgr/sysguid.h>
-
BOOLEAN
ResetDevice(
IN LPCWSTR DeviceId)
ULONG Disposition;
NTSTATUS Status;
BOOLEAN deviceInstalled = FALSE;
+ UNICODE_STRING UpperFiltersU = RTL_CONSTANT_STRING(L"UpperFilters");
+ LPWSTR keyboardClass = L"kbdclass\0";
+ BOOLEAN keyboardDevice = FALSE;
/* Check if we know the hardware */
if (!SetupFindFirstLineW(hInf, L"HardwareIdsDatabase", HardwareId, &Context))
if (!SetupFindFirstLineW(hInf, L"BootBusExtenders.Load", Driver, &Context)
&& !SetupFindFirstLineW(hInf, L"BusExtenders.Load", Driver, &Context)
&& !SetupFindFirstLineW(hInf, L"SCSI.Load", Driver, &Context)
- && !SetupFindFirstLineW(hInf, L"Keyboard.Load", Driver, &Context))
- return FALSE;
+ && !SetupFindFirstLineW(hInf, L"InputDevicesSupport.Load", Driver, &Context))
+ {
+ if (!SetupFindFirstLineW(hInf, L"Keyboard.Load", Driver, &Context))
+ return FALSE;
+
+ keyboardDevice = TRUE;
+ }
+
if (!INF_GetDataField(&Context, 1, &ImagePath))
return FALSE;
ImagePath,
(wcslen(ImagePath) + 1) * sizeof(WCHAR));
+ if (keyboardDevice)
+ {
+ DPRINT1("Installing keyboard class driver for '%S'\n", DeviceId);
+ NtSetValueKey(hDeviceKey,
+ &UpperFiltersU,
+ 0,
+ REG_MULTI_SZ,
+ keyboardClass,
+ (wcslen(keyboardClass) + 2) * sizeof(WCHAR));
+ }
+
/* Associate device with the service we just filled */
Status = NtSetValueKey(
hDeviceKey,