[Wine-patches] mountmgr.sys: Create "DeviceDesc" registry entry for USBSTOR device (eterbug #4403).

Alexander Morozov amorozov на etersoft.ru
Ср Мар 17 15:56:05 MSK 2010


----------- следующая часть -----------
From e56b99953275e048dd72f55a9266f6697f0f242c Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на etersoft.ru>
Date: Wed, 17 Mar 2010 15:45:51 +0300
Subject: [PATCH] mountmgr.sys: Create "DeviceDesc" registry entry for USBSTOR device (eterbug #4403).

---
 dlls/mountmgr.sys/device.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/dlls/mountmgr.sys/device.c b/dlls/mountmgr.sys/device.c
index cc17f9d..6d02155 100644
--- a/dlls/mountmgr.sys/device.c
+++ b/dlls/mountmgr.sys/device.c
@@ -513,6 +513,7 @@ static void register_usbstor_device( struct dos_drive *drive, const char *vendor
                                      '%','s','&','P','r','o','d','_','%','s','&',
                                      'R','e','v','_','%','s','\\','%','s','&','0',0};
     static const WCHAR dos_devicesW[] = {'\\','D','o','s','D','e','v','i','c','e','s',0};
+    static const WCHAR disk_driveW[] = {'D','i','s','k',' ','d','r','i','v','e',0};
     WCHAR diskW[] = {'\\','D','o','s','D','e','v','i','c','e','s','\\',
                      'A' + drive->drive,':',0};
     LPWSTR devnameW, vendorW, productW, revisionW, serialW, linkW, device_idW = NULL;
@@ -576,6 +577,11 @@ static void register_usbstor_device( struct dos_drive *drive, const char *vendor
         ret = SetupDiRegisterDeviceInfo( set, &devInfo, 0, NULL, NULL, NULL );
         if (!ret) goto done;
     }
+    SetupDiGetDeviceRegistryPropertyW( set, &devInfo, SPDRP_DEVICEDESC,
+                                       NULL, NULL, 0, &size );
+    if (!size)
+        SetupDiSetDeviceRegistryPropertyW( set, &devInfo, SPDRP_DEVICEDESC,
+                                           (BYTE *)disk_driveW, sizeof(disk_driveW) );
     interfaceData.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA);
     ret = SetupDiCreateDeviceInterfaceW( set, &devInfo, &GUID_DEVINTERFACE_DISK,
                                         NULL, 0, &interfaceData );
-- 
1.6.5.8



Подробная информация о списке рассылки Wine-patches