IoGetDeviceProperty(): Fix DevicePropertyEnumeratorName Implement DevicePropertyPhysicalDeviceObjectName Modified: trunk/reactos/ntoskrnl/io/pnpmgr.c _____
Modified: trunk/reactos/ntoskrnl/io/pnpmgr.c --- trunk/reactos/ntoskrnl/io/pnpmgr.c 2005-05-19 22:02:34 UTC (rev 15414) +++ trunk/reactos/ntoskrnl/io/pnpmgr.c 2005-05-19 22:04:45 UTC (rev 15415) @@ -236,6 +236,7 @@
if (Ptr != NULL) { Length = (ULONG)((ULONG_PTR)Ptr - (ULONG_PTR)DeviceNode->InstancePath.Buffer) + sizeof(WCHAR); + Data = DeviceNode->InstancePath.Buffer; } else { @@ -245,7 +246,9 @@ break;
case DevicePropertyPhysicalDeviceObjectName: - return STATUS_NOT_IMPLEMENTED; + Length = DeviceNode->InstancePath.Length + sizeof(WCHAR); + Data = DeviceNode->InstancePath.Buffer; + break;
default: return STATUS_INVALID_PARAMETER_2; @@ -257,7 +260,8 @@ RtlCopyMemory(PropertyBuffer, Data, Length);
/* Terminate the string */ - if (DeviceProperty == DevicePropertyEnumeratorName) + if (DeviceProperty == DevicePropertyEnumeratorName + || DeviceProperty == DevicePropertyPhysicalDeviceObjectName) { Ptr = (PWSTR)PropertyBuffer; Ptr[(Length / sizeof(WCHAR)) - 1] = 0;