[Wine-patches] [eterhack 2/6] ntoskrnl.exe: Add support in IoGetDeviceProperty for DevicePropertyHardwareID.
Alexander Morozov
=?iso-8859-1?q?amorozov_=CE=C1_etersoft=2Eru?=
Ср Май 20 13:01:31 MSD 2009
----------- следующая часть -----------
From 44f17930d74ec4a0fc83fae24eca325f6794f175 Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на etersoft.ru>
Date: Tue, 5 May 2009 13:25:29 +0400
Subject: [eterhack 2/6] ntoskrnl.exe: Add support in IoGetDeviceProperty for DevicePropertyHardwareID.
---
dlls/ntoskrnl.exe/ntoskrnl.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index b400d25..22ccab0 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -1739,6 +1739,20 @@ NTSTATUS WINAPI IoGetDeviceProperty( PDEVICE_OBJECT DeviceObject,
switch (DeviceProperty)
{
+ case DevicePropertyHardwareID:
+ {
+ WCHAR *hardware_id;
+
+ status = get_device_id( DeviceObject, BusQueryDeviceID, &hardware_id );
+ if (status != STATUS_SUCCESS) break;
+ *ResultLength = (strlenW(hardware_id) + 1) * sizeof(WCHAR);
+ if (BufferLength >= *ResultLength)
+ strcpyW( PropertyBuffer, hardware_id );
+ else
+ status = STATUS_BUFFER_TOO_SMALL;
+ ExFreePool( hardware_id );
+ break;
+ }
case DevicePropertyPhysicalDeviceObjectName:
{
WCHAR device_name[MAX_PATH];
--
1.6.2.5
Подробная информация о списке рассылки Wine-patches