- Copy property data to the user-mode buffer.

- Return the enumerator name without trailing backslash.

svn path=/trunk/; revision=44913
This commit is contained in:
Eric Kohl 2010-01-03 15:24:16 +00:00
parent d9a4e205a7
commit 7536c9f6ec
2 changed files with 2 additions and 2 deletions

View file

@ -268,7 +268,7 @@ IopGetDeviceProperty(PPLUGPLAY_CONTROL_PROPERTY_DATA PropertyData)
{
_SEH2_TRY
{
memcpy(Buffer, PropertyData->Buffer, BufferSize);
memcpy(PropertyData->Buffer, Buffer, BufferSize);
PropertyData->BufferSize = BufferSize;
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)

View file

@ -3236,7 +3236,7 @@ IoGetDeviceProperty(IN PDEVICE_OBJECT DeviceObject,
* always contains the enumerator name followed by \\ */
Ptr = wcschr(DeviceNode->InstancePath.Buffer, L'\\');
ASSERT(Ptr);
Length = (Ptr - DeviceNode->InstancePath.Buffer + 1) * sizeof(WCHAR);
Length = (Ptr - DeviceNode->InstancePath.Buffer) * sizeof(WCHAR);
Data = DeviceNode->InstancePath.Buffer;
break;