Windows: stop auto-mount scan on mount cancellation

Add a cancel callback and batch abort flag so auto-mount-all stops after dialog cancellation.

Mark MountVolume ERR_USER_ABORT with ERROR_CANCELLED so external /cancelmount also stops the scan.
This commit is contained in:
Mounir IDRASSI
2026-06-08 20:19:47 +09:00
parent 1871765a76
commit 304088f908
7 changed files with 578 additions and 124 deletions
+1
View File
@@ -733,6 +733,7 @@ namespace VeraCrypt
{
FillFavoriteVolumesMenu();
::ClearFavoriteVolumeArrivalMountSuppressions ();
FavoritesOnArrivalMountRequired.clear();
for (const FavoriteVolume& favorite: FavoriteVolumes)
+568 -110
View File
File diff suppressed because it is too large Load Diff
+1 -10
View File
@@ -116,18 +116,9 @@ static BOOL CALLBACK DefaultMountParametersDlgProc (HWND hwndDlg, UINT msg, WPAR
#ifdef __cplusplus
}
typedef struct
{
BOOL systemFavorites;
BOOL logOnMount;
BOOL hotKeyMount;
/* Owned by the thread parameter when non-NULL. */
VeraCrypt::FavoriteVolume* favoriteVolumeToMount;
} mountFavoriteVolumeThreadParam;
void SetDriverConfigurationFlag (uint32 flag, BOOL state);
BOOL MountFavoriteVolumes (HWND hwnd, BOOL systemFavorites = FALSE, BOOL logOnMount = FALSE, BOOL hotKeyMount = FALSE, const VeraCrypt::FavoriteVolume &favoriteVolumeToMount = VeraCrypt::FavoriteVolume());
void __cdecl mountFavoriteVolumeThreadFunction (void *pArg);
void ClearFavoriteVolumeArrivalMountSuppressions ();
// A class that represents a device based on its device ID
class CDevice