[PATCH v3] ntoskrnl.exe: Implement IoGetDeviceProperty for DevicePropertyPhysicalDeviceObjectName
Alexandre Julliard
julliard at winehq.org
Fri Jan 29 08:29:27 CST 2016
Aric Stewart <aric at codeweavers.com> writes:
> + case DevicePropertyPhysicalDeviceObjectName:
> + {
> + ULONG used_len;
> + OBJECT_NAME_INFORMATION *name = HeapAlloc(GetProcessHeap(), 0, buffer_length + (sizeof(OBJECT_NAME_INFORMATION)));
> +
> + status = NtQueryObject(device->Reserved, ObjectNameInformation, name, buffer_length + sizeof(OBJECT_NAME_INFORMATION), &used_len);
> + if (status == STATUS_SUCCESS)
> + {
> + memcpy(property_buffer, name->Name.Buffer, name->Name.Length);
> + *result_length = name->Name.Length;
> + }
> + else
> + *result_length = 0;
Length is still not correct if the buffer is too small, and the string
needs to be null-terminated.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list