From: Alexander Morozov Date: Wed, 17 Mar 2010 12:45:51 +0000 (+0300) Subject: mountmgr.sys: Create "DeviceDesc" registry entry for USBSTOR device (eterbug #4403). X-Git-Tag: 1.0.12-alt5.1~29 X-Git-Url: http://git.etersoft.ru/projects/?a=commitdiff_plain;h=2cf05aaba0054f23e412d04d789613b42e04764a;p=wine%2Feterwine.git mountmgr.sys: Create "DeviceDesc" registry entry for USBSTOR device (eterbug #4403). --- diff --git a/dlls/mountmgr.sys/device.c b/dlls/mountmgr.sys/device.c index cc17f9db54..6d0215576d 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 );