28 ULONG DefaultKeyboardDataQueueSize = 0x64;
29 PCWSTR DefaultKeyboardDeviceBaseName =
L"KeyboardPort";
30 ULONG DefaultMouseDataQueueSize = 0x64;
31 ULONG DefaultMouseResolution = 3;
32 ULONG DefaultMouseSynchIn100ns = 20000000;
33 ULONG DefaultNumberOfButtons = 2;
34 PCWSTR DefaultPointerDeviceBaseName =
L"PointerPort";
35 ULONG DefaultPollStatusIterations = 1;
36 ULONG DefaultOverrideKeyboardType = 4;
37 ULONG DefaultOverrideKeyboardSubtype = 0;
38 ULONG DefaultPollingIterations = 12000;
39 ULONG DefaultPollingIterationsMaximum = 12000;
40 ULONG DefaultResendIterations = 0x3;
41 ULONG DefaultSampleRate = 60;
42 ULONG DefaultCrashOnCtrlScroll;
48 DefaultCrashOnCtrlScroll = 1;
50 DefaultCrashOnCtrlScroll = 0;
62 Parameters[1].DefaultData = &DefaultKeyboardDataQueueSize;
76 Parameters[3].DefaultData = &DefaultMouseDataQueueSize;
83 Parameters[4].DefaultData = &DefaultMouseResolution;
90 Parameters[5].DefaultData = &DefaultMouseSynchIn100ns;
97 Parameters[6].DefaultData = &DefaultNumberOfButtons;
111 Parameters[8].DefaultData = &DefaultPollStatusIterations;
118 Parameters[9].DefaultData = &DefaultOverrideKeyboardType;
125 Parameters[10].DefaultData = &DefaultOverrideKeyboardSubtype;
132 Parameters[11].DefaultData = &DefaultPollingIterations;
139 Parameters[12].DefaultData = &DefaultPollingIterationsMaximum;
146 Parameters[13].DefaultData = &DefaultResendIterations;
153 Parameters[14].DefaultData = &DefaultSampleRate;
160 Parameters[15].DefaultData = &DefaultCrashOnCtrlScroll;
173 if (
Settings->KeyboardDataQueueSize < 1)
174 Settings->KeyboardDataQueueSize = DefaultKeyboardDataQueueSize;
175 if (
Settings->MouseDataQueueSize < 1)
176 Settings->MouseDataQueueSize = DefaultMouseDataQueueSize;
178 Settings->NumberOfButtons = DefaultNumberOfButtons;
179 if (
Settings->PollingIterations < 0x400)
180 Settings->PollingIterations = DefaultPollingIterations;
181 if (
Settings->PollingIterationsMaximum < 0x400)
182 Settings->PollingIterationsMaximum = DefaultPollingIterationsMaximum;
184 Settings->ResendIterations = DefaultResendIterations;
189 Settings->KeyboardDataQueueSize = DefaultKeyboardDataQueueSize;
190 Settings->MouseDataQueueSize = DefaultMouseDataQueueSize;
191 Settings->MouseResolution = DefaultMouseResolution;
192 Settings->MouseSynchIn100ns = DefaultMouseSynchIn100ns;
193 Settings->NumberOfButtons = DefaultNumberOfButtons;
194 Settings->PollStatusIterations = DefaultPollStatusIterations;
195 Settings->OverrideKeyboardType = DefaultOverrideKeyboardType;
196 Settings->OverrideKeyboardSubtype = DefaultOverrideKeyboardSubtype;
197 Settings->PollingIterations = DefaultPollingIterations;
198 Settings->PollingIterationsMaximum = DefaultPollingIterationsMaximum;
199 Settings->ResendIterations = DefaultResendIterations;
200 Settings->SampleRate = DefaultSampleRate;
201 Settings->CrashOnCtrlScroll = DefaultCrashOnCtrlScroll;
205 WARN_(I8042PRT,
"RtlCreateUnicodeString() failed\n");
216 INFO_(I8042PRT,
"KeyboardDataQueueSize : 0x%lx\n",
Settings->KeyboardDataQueueSize);
217 INFO_(I8042PRT,
"KeyboardDeviceBaseName : %wZ\n", &
Settings->KeyboardDeviceBaseName);
218 INFO_(I8042PRT,
"MouseDataQueueSize : 0x%lx\n",
Settings->MouseDataQueueSize);
219 INFO_(I8042PRT,
"MouseResolution : 0x%lx\n",
Settings->MouseResolution);
220 INFO_(I8042PRT,
"MouseSynchIn100ns : %lu\n",
Settings->MouseSynchIn100ns);
221 INFO_(I8042PRT,
"NumberOfButtons : 0x%lx\n",
Settings->NumberOfButtons);
222 INFO_(I8042PRT,
"PointerDeviceBaseName : %wZ\n", &
Settings->PointerDeviceBaseName);
223 INFO_(I8042PRT,
"PollStatusIterations : 0x%lx\n",
Settings->PollStatusIterations);
224 INFO_(I8042PRT,
"OverrideKeyboardType : 0x%lx\n",
Settings->OverrideKeyboardType);
225 INFO_(I8042PRT,
"OverrideKeyboardSubtype : 0x%lx\n",
Settings->OverrideKeyboardSubtype);
226 INFO_(I8042PRT,
"PollingIterations : 0x%lx\n",
Settings->PollingIterations);
227 INFO_(I8042PRT,
"PollingIterationsMaximum : %lu\n",
Settings->PollingIterationsMaximum);
228 INFO_(I8042PRT,
"ResendIterations : 0x%lx\n",
Settings->ResendIterations);
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define NT_SUCCESS(StatCode)
NTSYSAPI NTSTATUS WINAPI RtlQueryRegistryValues(ULONG, PCWSTR, PRTL_QUERY_REGISTRY_TABLE, PVOID, PVOID)
#define RTL_QUERY_REGISTRY_SUBKEY
#define RTL_REGISTRY_ABSOLUTE
#define RTL_QUERY_REGISTRY_DIRECT
#define RTL_REGISTRY_OPTIONAL
#define RtlZeroMemory(Destination, Length)
#define STATUS_OBJECT_NAME_NOT_FOUND
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_POWER_POLICY_IDLE_SETTINGS Settings
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters