Author: hpoussin
Date: Sat Mar 17 23:53:05 2007
New Revision: 26124
URL:
http://svn.reactos.org/svn/reactos?rev=26124&view=rev
Log:
Fix default data sent to RtlQueryRegistryValues
Modified:
trunk/reactos/drivers/input/kbdclass/kbdclass.c
trunk/reactos/drivers/input/mouclass/mouclass.c
Modified: trunk/reactos/drivers/input/kbdclass/kbdclass.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/input/kbdclass/kbd…
==============================================================================
--- trunk/reactos/drivers/input/kbdclass/kbdclass.c (original)
+++ trunk/reactos/drivers/input/kbdclass/kbdclass.c Sat Mar 17 23:53:05 2007
@@ -211,7 +211,7 @@
ULONG DefaultConnectMultiplePorts = 0;
ULONG DefaultDataQueueSize = 0x64;
- UNICODE_STRING DefaultDeviceBaseName = RTL_CONSTANT_STRING(L"KeyboardClass");
+ PCWSTR DefaultDeviceBaseName = L"KeyboardClass";
ParametersRegistryKey.Length = 0;
ParametersRegistryKey.MaximumLength = RegistryPath->Length +
sizeof(L"\\Parameters") + sizeof(UNICODE_NULL);
@@ -245,7 +245,7 @@
Parameters[2].Name = L"KeyboardDeviceBaseName";
Parameters[2].EntryContext = &DriverExtension->DeviceBaseName;
Parameters[2].DefaultType = REG_SZ;
- Parameters[2].DefaultData = &DefaultDeviceBaseName;
+ Parameters[2].DefaultData = (PVOID)DefaultDeviceBaseName;
Parameters[2].DefaultLength = 0;
Status = RtlQueryRegistryValues(
@@ -273,10 +273,10 @@
/* Registry path doesn't exist. Set defaults */
DriverExtension->ConnectMultiplePorts = DefaultConnectMultiplePorts;
DriverExtension->DataQueueSize = DefaultDataQueueSize;
- Status = RtlDuplicateUnicodeString(
- RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE,
- &DefaultDeviceBaseName,
- &DriverExtension->DeviceBaseName);
+ if (RtlCreateUnicodeString(&DriverExtension->DeviceBaseName,
DefaultDeviceBaseName))
+ Status = STATUS_SUCCESS;
+ else
+ Status = STATUS_NO_MEMORY;
}
return Status;
Modified: trunk/reactos/drivers/input/mouclass/mouclass.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/input/mouclass/mou…
==============================================================================
--- trunk/reactos/drivers/input/mouclass/mouclass.c (original)
+++ trunk/reactos/drivers/input/mouclass/mouclass.c Sat Mar 17 23:53:05 2007
@@ -188,7 +188,7 @@
ULONG DefaultConnectMultiplePorts = 1;
ULONG DefaultDataQueueSize = 0x64;
- UNICODE_STRING DefaultDeviceBaseName = RTL_CONSTANT_STRING(L"PointerClass");
+ PCWSTR DefaultDeviceBaseName = L"PointerClass";
ParametersRegistryKey.Length = 0;
ParametersRegistryKey.MaximumLength = RegistryPath->Length +
sizeof(L"\\Parameters") + sizeof(UNICODE_NULL);
@@ -222,7 +222,7 @@
Parameters[2].Name = L"PointerDeviceBaseName";
Parameters[2].EntryContext = &DriverExtension->DeviceBaseName;
Parameters[2].DefaultType = REG_SZ;
- Parameters[2].DefaultData = &DefaultDeviceBaseName;
+ Parameters[2].DefaultData = (PVOID)DefaultDeviceBaseName;
Parameters[2].DefaultLength = 0;
Status = RtlQueryRegistryValues(
@@ -250,10 +250,10 @@
/* Registry path doesn't exist. Set defaults */
DriverExtension->ConnectMultiplePorts = DefaultConnectMultiplePorts;
DriverExtension->DataQueueSize = DefaultDataQueueSize;
- Status = RtlDuplicateUnicodeString(
- RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE,
- &DefaultDeviceBaseName,
- &DriverExtension->DeviceBaseName);
+ if (RtlCreateUnicodeString(&DriverExtension->DeviceBaseName,
DefaultDeviceBaseName))
+ Status = STATUS_SUCCESS;
+ else
+ Status = STATUS_NO_MEMORY;
}
return Status;