mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2026-06-19 02:56:07 -05:00
Windows: Enable screen protection by default to block screenshots, recordings & Windows Recall. Add configurable setting in Preferences, Installer, and MSI.
This update introduces a screen protection mechanism that leverages the Windows Display Affinity API to prevent screen capture, screen recording, and inclusion in the Windows 11 Recall feature. By default, all VeraCrypt windows, menus, and tooltips are protected. Users can enable or disable this feature through a new setting available in the application Preferences, as well as in the installer and MSI configurations. This enhances user privacy by mitigating potential leaks of sensitive interface content. Note: Due to a regression in Windows 11 affecting layered windows, ComboBox dropdowns cannot currently be protected by this mechanism.
This commit is contained in:
@@ -2504,6 +2504,7 @@ static void UpdateWipeControls (void)
|
||||
|
||||
static void __cdecl sysEncDriveAnalysisThread (void *hwndDlgArg)
|
||||
{
|
||||
ScreenCaptureBlocker blocker;
|
||||
// Mark the detection process as 'in progress'
|
||||
HiddenSectorDetectionStatus = 1;
|
||||
SaveSettings (NULL);
|
||||
@@ -2548,6 +2549,7 @@ static void __cdecl volTransformThreadFunction (void *hwndDlgArg)
|
||||
BOOL bHidden;
|
||||
HWND hwndDlg = (HWND) hwndDlgArg;
|
||||
volatile FORMAT_VOL_PARAMETERS *volParams = (FORMAT_VOL_PARAMETERS *) malloc (sizeof(FORMAT_VOL_PARAMETERS));
|
||||
ScreenCaptureBlocker blocker;
|
||||
|
||||
if (volParams == NULL)
|
||||
AbortProcess ("ERR_MEM_ALLOC");
|
||||
@@ -6162,6 +6164,10 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
case WM_DESTROY:
|
||||
DetachProtectionFromCurrentThread();
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -9076,6 +9082,10 @@ ovf_end:
|
||||
PostMessage (hwndDlg, TC_APPMSG_FORMAT_USER_QUIT, 0, 0);
|
||||
return 1;
|
||||
|
||||
case WM_DESTROY:
|
||||
DetachProtectionFromCurrentThread();
|
||||
break;
|
||||
|
||||
case WM_NCDESTROY:
|
||||
{
|
||||
hPasswordInputField = NULL;
|
||||
@@ -10565,6 +10575,7 @@ static void AfterWMInitTasks (HWND hwndDlg)
|
||||
int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpszCommandLine, int nCmdShow)
|
||||
{
|
||||
int status;
|
||||
ScreenCaptureBlocker blocker;
|
||||
atexit (localcleanup);
|
||||
|
||||
VirtualLock (&volumePassword, sizeof(volumePassword));
|
||||
|
||||
Reference in New Issue
Block a user