[SHELL32] Prevent a second call to Drive Properties dialog (#4888)
authorJose Carlos Jesus <zecarlos1957@hotmail.com>
Sun, 20 Nov 2022 18:10:11 +0000 (18:10 +0000)
committerGitHub <noreply@github.com>
Sun, 20 Nov 2022 18:10:11 +0000 (21:10 +0300)
commit685728bc248a3922644c0b7938fa86a236526077
tree8508bb47a5ee4563cffa12a0a95bc08d566dad3c
parentc093d4f8038e7ddec1ca193edc573c48e12f12ff
[SHELL32] Prevent a second call to Drive Properties dialog (#4888)

CDefaultContextMenu::DoProperties provides a fallback call
to the property sheet testing the return value of the _DoCallback method,
which is ultimately the return value of SH_ShowDriveProperties().

SH_ShowDriveProperties() sometimes returns an HRESULT, however it is marked
as returning a BOOL. Then, DrivesContextMenuCallback() always handles this
result as an HRESULT.

Fix SH_ShowDriveProperties() to always return a BOOL as it is intended,
and in DrivesContextMenuCallback() handle the result accordingly.

CORE-18537
dll/win32/shell32/dialogs/drive.cpp
dll/win32/shell32/folders/CDrivesFolder.cpp