This commit is contained in:
DavidXanatos 2023-12-16 21:55:54 +01:00
parent 20320d1643
commit cc6b3bbb58
2 changed files with 7 additions and 4 deletions

View File

@ -22,6 +22,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- fixed UseNewSymlinkResolver causes applications to create both the link and the target folder [#3481](https://github.com/sandboxie-plus/Sandboxie/issues/3481)
- fixed Renaming a sandbox breaks Group hierarchy [#3430](https://github.com/sandboxie-plus/Sandboxie/issues/3430)
- fixed Encrypted confidential Box + red box preset blocks box access to it's own root directories [#3475](https://github.com/sandboxie-plus/Sandboxie/issues/3475)
- fixed SandMan-v1.12.3 crashed! [#3492](https://github.com/sandboxie-plus/Sandboxie/issues/3492)

View File

@ -229,10 +229,10 @@ std::wstring QueryDiskDeviceInterfaceString(PWSTR DeviceInterface, CONST DEVPROP
WCHAR deviceInstanceId[MAX_DEVICE_ID_LEN + 1] = L"";
if (CM_Get_Device_Interface_Property(DeviceInterface, &DEVPKEY_Device_InstanceId, &devicePropertyType, (PBYTE)deviceInstanceId, &deviceInstanceIdLength, 0 ) != CR_SUCCESS)
return FALSE;
return L"";
if (CM_Locate_DevNode(&deviceInstanceHandle, deviceInstanceId, CM_LOCATE_DEVNODE_PHANTOM ) != CR_SUCCESS)
return FALSE;
return L"";
bufferSize = 0x40;
std::wstring deviceDescription;
@ -290,9 +290,11 @@ std::map<std::wstring, SDriveInfo> ListAllDrives()
if (DeviceIoControl(deviceHandle, IOCTL_STORAGE_GET_DEVICE_NUMBER, NULL, 0, &result, sizeof(result), &dwRet, NULL))
{
std::wstring name = QueryDiskDeviceInterfaceString(deviceInterface, &DEVPKEY_Device_FriendlyName);
std::wstring enumerator = QueryDiskDeviceInterfaceString(deviceInterface, &DEVPKEY_Device_EnumeratorName);
if (!name.empty()) {
std::wstring enumerator = QueryDiskDeviceInterfaceString(deviceInterface, &DEVPKEY_Device_EnumeratorName);
drives[pdevice->prefix + std::to_wstring(result.DeviceNumber)] = SDriveInfo{ name , deviceInterface , enumerator};
drives[pdevice->prefix + std::to_wstring(result.DeviceNumber)] = SDriveInfo{ name , deviceInterface , enumerator };
}
}
// else // not connected