[PATCH v3] ntoskrnl.exe: Implement IoGetDeviceProperty for DevicePropertyPhysicalDeviceObjectName
Aric Stewart
aric at codeweavers.com
Fri Jan 29 08:31:48 CST 2016
On 1/29/16 8:29 AM, Alexandre Julliard wrote:
> 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.
>
Sorry you are correct I am trying to focus on too many divergent things at once and my brain has stated to turn to mush.
-aric
More information about the wine-devel
mailing list