mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 02:58:02 -06:00
Correctly handle dialogs from previous versions that used 'TRUE' instead of 'VERA' as a value for GWLP_USERDATA.
This commit is contained in:
@@ -8414,7 +8414,8 @@ void HandleDriveNotReadyError ()
|
||||
|
||||
BOOL CALLBACK CloseTCWindowsEnum (HWND hwnd, LPARAM lParam)
|
||||
{
|
||||
if (GetWindowLongPtr (hwnd, GWLP_USERDATA) == (LONG_PTR) 'VERA')
|
||||
LONG_PTR userDataVal = GetWindowLongPtr (hwnd, GWLP_USERDATA);
|
||||
if ((userDataVal == (LONG_PTR) 'VERA') || (userDataVal == (LONG_PTR) 'TRUE')) // Prior to 1.0e, 'TRUE' was used for VeraCrypt dialogs
|
||||
{
|
||||
char name[1024] = { 0 };
|
||||
GetWindowText (hwnd, name, sizeof (name) - 1);
|
||||
@@ -8439,7 +8440,8 @@ BOOL CALLBACK FindTCWindowEnum (HWND hwnd, LPARAM lParam)
|
||||
if (*(HWND *)lParam == hwnd)
|
||||
return TRUE;
|
||||
|
||||
if (GetWindowLongPtr (hwnd, GWLP_USERDATA) == (LONG_PTR) 'VERA')
|
||||
LONG_PTR userDataVal = GetWindowLongPtr (hwnd, GWLP_USERDATA);
|
||||
if ((userDataVal == (LONG_PTR) 'VERA') || (userDataVal == (LONG_PTR) 'TRUE')) // Prior to 1.0e, 'TRUE' was used for VeraCrypt dialogs
|
||||
{
|
||||
char name[32] = { 0 };
|
||||
GetWindowText (hwnd, name, sizeof (name) - 1);
|
||||
|
||||
@@ -377,7 +377,8 @@ static void localcleanup (void)
|
||||
|
||||
static BOOL CALLBACK BroadcastSysEncCfgUpdateCallb (HWND hwnd, LPARAM lParam)
|
||||
{
|
||||
if (GetWindowLongPtr (hwnd, GWLP_USERDATA) == (LONG_PTR) 'VERA')
|
||||
LONG_PTR userDataVal = GetWindowLongPtr (hwnd, GWLP_USERDATA);
|
||||
if ((userDataVal == (LONG_PTR) 'VERA') || (userDataVal == (LONG_PTR) 'TRUE')) // Prior to 1.0e, 'TRUE' was used for VeraCrypt dialogs
|
||||
{
|
||||
char name[1024] = { 0 };
|
||||
GetWindowText (hwnd, name, sizeof (name) - 1);
|
||||
|
||||
Reference in New Issue
Block a user