mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-22 02:45:11 -04:00
[enum] use Unicode when retrieving the device friendly name
* This should fix the improper display of some localized strings such as "Microsoft Virtual Disk"
This commit is contained in:
parent
de386329e4
commit
66534640a4
3 changed files with 26 additions and 6 deletions
|
@ -376,7 +376,7 @@ BOOL GetDevices(DWORD devnum)
|
|||
&datatype, (LPBYTE)buffer, sizeof(buffer), &size) && IsRemovable(buffer);
|
||||
|
||||
memset(buffer, 0, sizeof(buffer));
|
||||
if (!SetupDiGetDeviceRegistryPropertyA(dev_info, &dev_info_data, SPDRP_FRIENDLYNAME,
|
||||
if (!SetupDiGetDeviceRegistryPropertyU(dev_info, &dev_info_data, SPDRP_FRIENDLYNAME,
|
||||
&datatype, (LPBYTE)buffer, sizeof(buffer), &size)) {
|
||||
uprintf("SetupDiGetDeviceRegistryProperty (Friendly Name) failed: %s\n", WindowsErrorString());
|
||||
// We can afford a failure on this call - just replace the name with "USB Storage Device (Generic)"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue