VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/ExpandVolume
diff options
context:
space:
mode:
Diffstat (limited to 'src/ExpandVolume')
-rw-r--r--src/ExpandVolume/DlgExpandVolume.cpp143
-rw-r--r--src/ExpandVolume/ExpandVolume.c213
-rw-r--r--src/ExpandVolume/ExpandVolume.h4
-rw-r--r--src/ExpandVolume/ExpandVolume.rc30
-rw-r--r--src/ExpandVolume/ExpandVolume.vcproj977
-rw-r--r--src/ExpandVolume/ExpandVolume.vcxproj543
-rw-r--r--src/ExpandVolume/ExpandVolume.vcxproj.filters416
-rw-r--r--src/ExpandVolume/ExpandVolume.vcxproj.user3
-rw-r--r--src/ExpandVolume/InitDataArea.c30
-rw-r--r--src/ExpandVolume/InitDataArea.h2
-rw-r--r--src/ExpandVolume/VeraCryptExpander.manifest35
-rw-r--r--src/ExpandVolume/WinMain.cpp196
-rw-r--r--src/ExpandVolume/resource.h19
13 files changed, 820 insertions, 1791 deletions
diff --git a/src/ExpandVolume/DlgExpandVolume.cpp b/src/ExpandVolume/DlgExpandVolume.cpp
index d0a98fef..0d803511 100644
--- a/src/ExpandVolume/DlgExpandVolume.cpp
+++ b/src/ExpandVolume/DlgExpandVolume.cpp
@@ -8,9 +8,9 @@
and also from the source code of extcv, which is Copyright (c) 2009-2010 Kih-Oskh
or Copyright (c) 2012-2013 Josef Schneider <josef@netpage.dk>
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2016 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2017 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages. */
@@ -48,8 +48,10 @@
#define TIMER_ID_RANDVIEW 0xff
#define TIMER_INTERVAL_RANDVIEW 50
+BOOL bSeManageVolumeNameSet = FALSE;
+
// see definition of enum EV_FileSystem
const wchar_t * szFileSystemStr[4] = {L"RAW",L"FAT",L"NTFS",L"EXFAT"};
// prototypes for internal functions
@@ -58,17 +60,17 @@ BOOL CALLBACK ExpandVolProgressDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, L
namespace VeraCryptExpander
{
/* defined in WinMain.c, referenced by ExpandVolumeWizard() */
-int ExtcvAskVolumePassword (HWND hwndDlg, const wchar_t* fileName, Password *password, int *pkcs5, int *pim, BOOL* truecryptMode, char *titleStringId, BOOL enableMountOptions);
+int ExtcvAskVolumePassword (HWND hwndDlg, const wchar_t* fileName, Password *password, int *pkcs5, int *pim, char *titleStringId, BOOL enableMountOptions);
}
int GetSpaceString(wchar_t *dest, size_t cbDest, uint64 size, BOOL bDevice)
{
const wchar_t * szFmtBytes = L"%.0lf %s";
const wchar_t * szFmtOther = L"%.2lf %s";
- const wchar_t * SuffixStr[] = {L"Byte", L"KB", L"MB", L"GB", L"TB"};
+ const wchar_t * SuffixStr[] = {GetString("BYTE"), GetString("KB"), GetString("MB"), GetString("GB"), GetString("TB")};
const uint64 Muliplier[] = {1, BYTES_PER_KB, BYTES_PER_MB, BYTES_PER_GB, BYTES_PER_TB};
const int nMaxSuffix = sizeof(Muliplier)/sizeof(uint64) - 1;
int i;
@@ -116,8 +118,22 @@ uint64 GetSizeBoxMultiplier(HWND hwndDlg)
return Muliplier[i];
}
+void HandleQuickExpanddCheckBox (HWND hwndDlg)
+{
+ if (IsButtonChecked (GetDlgItem (hwndDlg, IDC_INIT_NEWSPACE)))
+ {
+ EnableWindow (GetDlgItem (hwndDlg, IDC_QUICKEXPAND), FALSE);
+ SendDlgItemMessage (hwndDlg, IDC_QUICKEXPAND, BM_SETCHECK, BST_UNCHECKED, 0);
+ }
+ else
+ {
+ EnableWindow (GetDlgItem (hwndDlg, IDC_QUICKEXPAND), TRUE);
+ }
+}
+
+
BOOL CALLBACK ExpandVolSizeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
static EXPAND_VOL_THREAD_PARAMS *pVolExpandParam;
@@ -130,8 +146,10 @@ BOOL CALLBACK ExpandVolSizeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
wchar_t szTemp[4096];
pVolExpandParam = (EXPAND_VOL_THREAD_PARAMS*)lParam;
+ LocalizeDialog (hwndDlg, NULL);
+
EnableWindow (GetDlgItem (hwndDlg, IDC_SIZEBOX), !pVolExpandParam->bIsDevice);
EnableWindow (GetDlgItem (hwndDlg, IDC_KB), !pVolExpandParam->bIsDevice);
EnableWindow (GetDlgItem (hwndDlg, IDC_MB), !pVolExpandParam->bIsDevice);
EnableWindow (GetDlgItem (hwndDlg, IDC_GB), !pVolExpandParam->bIsDevice);
@@ -162,25 +180,31 @@ BOOL CALLBACK ExpandVolSizeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
wchar_t szHostFreeStr[256];
SetWindowText (GetDlgItem (hwndDlg, IDT_NEW_SIZE), L"");
GetSpaceString(szHostFreeStr,sizeof(szHostFreeStr),pVolExpandParam->hostSizeFree,FALSE);
- StringCbPrintfW (szTemp,sizeof(szTemp),L"%s available on host drive", szHostFreeStr);
+ StringCbPrintfW (szTemp,sizeof(szTemp),GetString("EXPANDER_FREE_SPACE"), szHostFreeStr);
+
+ if (!pVolExpandParam->bDisableQuickExpand)
+ {
+ ShowWindow (GetDlgItem (hwndDlg, IDC_QUICKEXPAND), SW_SHOW);
+ HandleQuickExpanddCheckBox (hwndDlg);
+ }
}
SetWindowText (GetDlgItem (hwndDlg, IDC_EXPAND_VOLUME_NEWSIZE), szTemp);
// set help text
if (pVolExpandParam->bIsDevice)
{
- StringCbPrintfW (szTemp,sizeof(szTemp),L"This is a device-based VeraCrypt volume.\n\nThe new volume size will be choosen automatically as the size of the host device.");
+ StringCbPrintfW (szTemp,sizeof(szTemp),GetString("EXPANDER_HELP_DEVICE"));
if (pVolExpandParam->bIsLegacy)
StringCbCatW(szTemp,sizeof(szTemp),L" Note: filling the new space with random data is not supported for legacy volumes.");
}
else
{
- StringCbPrintfW (szTemp, sizeof(szTemp),L"Please specify the new size of the VeraCrypt volume (must be at least %I64u KB larger than the current size).",TC_MINVAL_FS_EXPAND/1024);
+ StringCbPrintfW (szTemp, sizeof(szTemp),GetString("EXPANDER_HELP_FILE"),TC_MINVAL_FS_EXPAND/1024);
}
- SetWindowText (GetDlgItem (hwndDlg, IDC_BOX_HELP), szTemp);
+ SetWindowText (GetDlgItem (hwndDlg, IDC_BOX_HELP), szTemp);
}
return 0;
@@ -191,13 +215,14 @@ BOOL CALLBACK ExpandVolSizeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
EndDialog (hwndDlg, lw);
return 1;
}
- if (lw == IDOK)
+ if (lw == IDC_CONTINUE)
{
wchar_t szTemp[4096];
pVolExpandParam->bInitFreeSpace = IsButtonChecked (GetDlgItem (hwndDlg, IDC_INIT_NEWSPACE));
+ pVolExpandParam->bQuickExpand = IsButtonChecked (GetDlgItem (hwndDlg, IDC_QUICKEXPAND));
if (!pVolExpandParam->bIsDevice) // for devices new size is set by calling function
{
GetWindowText (GetDlgItem (hwndDlg, IDC_SIZEBOX), szTemp, ARRAYSIZE (szTemp));
pVolExpandParam->newSize = _wtoi64(szTemp) * GetSizeBoxMultiplier(hwndDlg);
@@ -206,8 +231,25 @@ BOOL CALLBACK ExpandVolSizeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
EndDialog (hwndDlg, lw);
return 1;
}
+ if (lw == IDC_INIT_NEWSPACE && !pVolExpandParam->bDisableQuickExpand)
+ {
+ HandleQuickExpanddCheckBox (hwndDlg);
+ return 1;
+ }
+
+ if (lw == IDC_QUICKEXPAND && IsButtonChecked (GetDlgItem (hwndDlg, IDC_QUICKEXPAND)))
+ {
+ // If quick expand selected, then we warn about security issue
+ if (MessageBoxW (hwndDlg, GetString ("QUICK_EXPAND_WARNING"),
+ lpszTitle, YES_NO|MB_ICONWARNING|MB_DEFBUTTON2) == IDNO)
+ {
+ SendDlgItemMessage (hwndDlg, IDC_QUICKEXPAND, BM_SETCHECK, BST_UNCHECKED, 0);
+ return 1;
+ }
+ }
+
return 0;
}
return 0;
@@ -268,8 +310,10 @@ BOOL CALLBACK ExpandVolProgressDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, L
VirtualLock (randPool, sizeof(randPool));
VirtualLock (&mouseEntropyGathered, sizeof(mouseEntropyGathered));
VirtualLock (maskRandPool, sizeof(maskRandPool));
+ LocalizeDialog (hwndDlg, NULL);
+
mouseEntropyGathered = 0xFFFFFFFF;
mouseEventsInitialCount = 0;
bUseMask = FALSE;
if (CryptAcquireContext (&hRngProv, NULL, MS_ENHANCED_PROV, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT | CRYPT_SILENT))
@@ -285,9 +329,9 @@ BOOL CALLBACK ExpandVolProgressDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, L
SetWindowText (GetDlgItem (hwndDlg, IDC_EXPAND_VOLUME_OLDSIZE), szOldHostSize);
SetWindowText (GetDlgItem (hwndDlg, IDC_EXPAND_VOLUME_NEWSIZE), szNewHostSize);
SetWindowText (GetDlgItem (hwndDlg, IDC_EXPAND_VOLUME_NAME), pProgressDlgParam->szVolumeName);
SetWindowText (GetDlgItem (hwndDlg, IDC_EXPAND_FILE_SYSTEM), szFileSystemStr[pProgressDlgParam->FileSystem]);
- SetWindowText (GetDlgItem (hwndDlg, IDC_EXPAND_VOLUME_INITSPACE), pProgressDlgParam->bInitFreeSpace?L"Yes":L"No");
+ SetWindowText (GetDlgItem (hwndDlg, IDC_EXPAND_VOLUME_INITSPACE), pProgressDlgParam->bInitFreeSpace?GetString("UISTR_YES"):GetString("UISTR_NO"));
SendMessage (GetDlgItem (hwndDlg, IDC_BOX_STATUS), WM_SETFONT, (WPARAM) hBoldFont, (LPARAM) TRUE);
SendMessage (GetDlgItem (hwndDlg, IDC_RANDOM_BYTES), WM_SETFONT, (WPARAM) hFixedDigitFont, (LPARAM) TRUE);
@@ -297,13 +341,13 @@ BOOL CALLBACK ExpandVolProgressDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, L
{
showRandPool = FALSE;
EnableWindow (GetDlgItem (hwndDlg, IDC_DISPLAY_POOL_CONTENTS), FALSE);
EnableWindow (GetDlgItem (hwndDlg, IDC_RANDOM_BYTES), FALSE);
- SetDlgItemText(hwndDlg, IDC_BOX_STATUS, L"Click 'Continue' to expand the volume.");
+ SetDlgItemText(hwndDlg, IDC_BOX_STATUS, GetString("EXPANDER_STATUS_TEXT_LEGACY"));
}
else
{
- SetDlgItemText(hwndDlg, IDC_BOX_STATUS, L"IMPORTANT: Move your mouse as randomly as possible within this window. The longer you move it, the better. This significantly increases the cryptographic strength of the encryption keys. Then click 'Continue' to expand the volume.");
+ SetDlgItemText(hwndDlg, IDC_BOX_STATUS, GetString("EXPANDER_STATUS_TEXT"));
}
SendMessage (GetDlgItem (hwndDlg, IDC_DISPLAY_POOL_CONTENTS), BM_SETCHECK, BST_UNCHECKED, 0);
hEntropyBar = GetDlgItem (hwndDlg, IDC_ENTROPY_BAR);
@@ -319,19 +363,19 @@ BOOL CALLBACK ExpandVolProgressDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, L
NormalCursor ();
if (nStatus != 0)
{
if ( nStatus != ERR_USER_ABORT )
- AddProgressDlgStatus (hwndDlg, L"Error: volume expansion failed.");
+ AddProgressDlgStatus (hwndDlg, GetString("EXPANDER_FINISH_ERROR"));
else
- AddProgressDlgStatus (hwndDlg, L"Error: operation aborted by user.");
+ AddProgressDlgStatus (hwndDlg, GetString("EXPANDER_FINISH_ABORT"));
}
else
{
- AddProgressDlgStatus (hwndDlg, L"Finished. Volume successfully expanded.");
+ AddProgressDlgStatus (hwndDlg, GetString("EXPANDER_FINISH_OK"));
}
- SetWindowText (GetDlgItem (hwndDlg, IDOK), L"Exit");
- EnableWindow (GetDlgItem (hwndDlg, IDOK), TRUE);
+ SetWindowText (GetDlgItem (hwndDlg, IDC_CONTINUE), GetString("EXIT"));
+ EnableWindow (GetDlgItem (hwndDlg, IDC_CONTINUE), TRUE);
EnableWindow (GetDlgItem (hwndDlg, IDCANCEL), FALSE);
}
return 1;
@@ -386,32 +430,34 @@ BOOL CALLBACK ExpandVolProgressDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, L
if (lw == IDCANCEL)
{
if (bVolTransformStarted)
{
- if (MessageBoxW (hwndDlg, L"Warning: Volume expansion is in progress!\n\nStopping now may result in a damaged volume.\n\nDo you really want to cancel?", lpszTitle, YES_NO|MB_ICONQUESTION|MB_DEFBUTTON2) == IDNO)
+ if (MessageBoxW (hwndDlg, GetString("EXPANDER_CANCEL_WARNING"), lpszTitle, YES_NO|MB_ICONQUESTION|MB_DEFBUTTON2) == IDNO)
return 1;
// tell the volume transform thread to terminate
bVolTransformThreadCancel = TRUE;
}
+ NormalCursor ();
EndDialog (hwndDlg, lw);
return 1;
}
- if (lw == IDOK)
+ if (lw == IDC_CONTINUE)
{
if (bVolTransformStarted)
{
// TransformThreadFunction finished -> OK button is now exit
+ NormalCursor ();
EndDialog (hwndDlg, lw);
}
else
{
showRandPool = FALSE;
KillTimer (hwndDlg, TIMER_ID_RANDVIEW);
EnableWindow (GetDlgItem (hwndDlg, IDC_DISPLAY_POOL_CONTENTS), FALSE);
- EnableWindow (GetDlgItem (hwndDlg, IDOK), FALSE);
- SetProgressDlgStatus (hwndDlg, L"Starting volume expansion ...\r\n");
+ EnableWindow (GetDlgItem (hwndDlg, IDC_CONTINUE), FALSE);
+ SetProgressDlgStatus (hwndDlg, GetString("EXPANDER_STARTING_STATUS"));
bVolTransformStarted = TRUE;
pProgressDlgParam->hwndDlg = hwndDlg;
if ( _beginthread (volTransformThreadFunction, 0, pProgressDlgParam) == -1L )
{
@@ -443,9 +489,8 @@ typedef struct
const wchar_t *volumePath;
Password *password;
int pkcs5_prf;
int pim;
- BOOL truecryptMode;
BOOL write;
BOOL preserveTimestamps;
BOOL useBackupHeader;
int* nStatus;
@@ -455,9 +500,9 @@ void CALLBACK OpenVolumeWaitThreadProc(void* pArg, HWND hwndDlg)
{
OpenVolumeThreadParam* pThreadParam = (OpenVolumeThreadParam*) pArg;
*(pThreadParam)->nStatus = OpenVolume(pThreadParam->context, pThreadParam->volumePath, pThreadParam->password, pThreadParam->pkcs5_prf,
- pThreadParam->pim, pThreadParam->truecryptMode, pThreadParam->write, pThreadParam->preserveTimestamps, pThreadParam->useBackupHeader);
+ pThreadParam->pim, pThreadParam->write, pThreadParam->preserveTimestamps, pThreadParam->useBackupHeader);
}
/*
ExpandVolumeWizard
@@ -493,9 +538,9 @@ void ExpandVolumeWizard (HWND hwndDlg, wchar_t *lpszVolume)
switch (IsSystemDevicePath (lpszVolume, hwndDlg, TRUE))
{
case 1:
case 2:
- MessageBoxW (hwndDlg, L"A VeraCrypt system volume can't be expanded.", lpszTitle, MB_OK|MB_ICONEXCLAMATION);
+ MessageBoxW (hwndDlg, GetString("EXPANDER_SYSTEM_VOLUME_ERROR"), lpszTitle, MB_OK|MB_ICONEXCLAMATION);
goto ret;
}
EnableElevatedCursorChange (hwndDlg);
@@ -521,9 +566,9 @@ void ExpandVolumeWizard (HWND hwndDlg, wchar_t *lpszVolume)
char *volTypeChoices[] = {0, "DOES_VOLUME_CONTAIN_HIDDEN", "VOLUME_CONTAINS_HIDDEN", "VOLUME_DOES_NOT_CONTAIN_HIDDEN", "IDCANCEL", 0};
switch (AskMultiChoice ((void **) volTypeChoices, FALSE, hwndDlg))
{
case 1:
- MessageBoxW (hwndDlg, L"An outer volume containing a hidden volume can't be expanded, because this destroys the hidden volume.", lpszTitle, MB_OK|MB_ICONEXCLAMATION);
+ MessageBoxW (hwndDlg, GetString("EXPANDER_HIDDEN_VOLUME_ERROR"), lpszTitle, MB_OK|MB_ICONEXCLAMATION);
goto ret;
case 2:
break;
@@ -547,11 +592,10 @@ void ExpandVolumeWizard (HWND hwndDlg, wchar_t *lpszVolume)
while (TRUE)
{
OpenVolumeContext expandVol;
- BOOL truecryptMode = FALSE;
- if (!VeraCryptExpander::ExtcvAskVolumePassword (hwndDlg, lpszVolume, &VolumePassword, &VolumePkcs5, &VolumePim, &truecryptMode, "ENTER_NORMAL_VOL_PASSWORD", FALSE))
+ if (!VeraCryptExpander::ExtcvAskVolumePassword (hwndDlg, lpszVolume, &VolumePassword, &VolumePkcs5, &VolumePim, "ENTER_NORMAL_VOL_PASSWORD", FALSE))
{
goto ret;
}
@@ -560,17 +604,15 @@ void ExpandVolumeWizard (HWND hwndDlg, wchar_t *lpszVolume)
if (KeyFilesEnable && FirstKeyFile)
KeyFilesApply (hwndDlg, &VolumePassword, FirstKeyFile, lpszVolume);
- WaitCursor ();
OpenVolumeThreadParam threadParam;
threadParam.context = &expandVol;
threadParam.volumePath = lpszVolume;
threadParam.password = &VolumePassword;
threadParam.pkcs5_prf = VolumePkcs5;
threadParam.pim = VolumePim;
- threadParam.truecryptMode = FALSE;
threadParam.write = FALSE;
threadParam.preserveTimestamps = bPreserveTimestamp;
threadParam.useBackupHeader = FALSE;
threadParam.nStatus = &nStatus;
@@ -657,41 +699,43 @@ void ExpandVolumeWizard (HWND hwndDlg, wchar_t *lpszVolume)
// check if there is enough free space on host device/drive to expand the volume
if ( (bIsDevice && hostSize < volSize + TC_MINVAL_FS_EXPAND) || (!bIsDevice && hostSizeFree < TC_MINVAL_FS_EXPAND) )
{
- MessageBoxW (hwndDlg, L"Not enough free space to expand the volume", lpszTitle, MB_OK|MB_ICONEXCLAMATION);
+ MessageBoxW (hwndDlg, GetString("EXPANDER_NO_FREE_SPACE"), lpszTitle, MB_OK|MB_ICONEXCLAMATION);
goto ret;
}
if (!bIsDevice && hostSize != volSize ) {
// there is some junk data at the end of the volume
- if (MessageBoxW (hwndDlg, L"Warning: The container file is larger than the VeraCrypt volume area. The data after the VeraCrypt volume area will be overwritten.\n\nDo you want to continue?", lpszTitle, YES_NO|MB_ICONQUESTION|MB_DEFBUTTON2) == IDNO)
+ if (MessageBoxW (hwndDlg, GetString("EXPANDER_WARNING_FILE_CONTAINER_JUNK"), lpszTitle, YES_NO|MB_ICONQUESTION|MB_DEFBUTTON2) == IDNO)
goto ret;
}
switch (volFSType)
{
case EV_FS_TYPE_NTFS:
break;
case EV_FS_TYPE_FAT:
- if (MessageBoxW (hwndDlg,L"Warning: The VeraCrypt volume contains a FAT file system!\n\nOnly the VeraCrypt volume itself will be expanded, but not the file system.\n\nDo you want to continue?",
+ if (MessageBoxW (hwndDlg, GetString("EXPANDER_WARNING_FAT"),
lpszTitle, YES_NO|MB_ICONQUESTION|MB_DEFBUTTON2) == IDNO)
goto ret;
break;
case EV_FS_TYPE_EXFAT:
- if (MessageBoxW (hwndDlg,L"Warning: The VeraCrypt volume contains an exFAT file system!\n\nOnly the VeraCrypt volume itself will be expanded, but not the file system.\n\nDo you want to continue?",
+ if (MessageBoxW (hwndDlg, GetString("EXPANDER_WARNING_EXFAT"),
lpszTitle, YES_NO|MB_ICONQUESTION|MB_DEFBUTTON2) == IDNO)
goto ret;
break;
default:
- if (MessageBoxW (hwndDlg,L"Warning: The VeraCrypt volume contains an unknown or no file system!\n\nOnly the VeraCrypt volume itself will be expanded, the file system remains unchanged.\n\nDo you want to continue?",
+ if (MessageBoxW (hwndDlg, GetString("EXPANDER_WARNING_UNKNOWN_FS"),
lpszTitle, YES_NO|MB_ICONQUESTION|MB_DEFBUTTON2) == IDNO)
goto ret;
}
EXPAND_VOL_THREAD_PARAMS VolExpandParam;
VolExpandParam.bInitFreeSpace = (bIsLegacy && bIsDevice) ? FALSE:TRUE;
+ VolExpandParam.bQuickExpand = FALSE;
+ VolExpandParam.bDisableQuickExpand = bIsDevice;
VolExpandParam.szVolumeName = lpszVolume;
VolExpandParam.FileSystem = volFSType;
VolExpandParam.pVolumePassword = &VolumePassword;
VolExpandParam.VolumePkcs5 = VolumePkcs5;
@@ -701,8 +745,19 @@ void ExpandVolumeWizard (HWND hwndDlg, wchar_t *lpszVolume)
VolExpandParam.oldSize = bIsDevice ? volSize : hostSize;
VolExpandParam.newSize = hostSize;
VolExpandParam.hostSizeFree = hostSizeFree;
+ // disable Quick Expand if the file is sparse or compressed
+ if (!bIsDevice)
+ {
+ DWORD dwFileAttrib = GetFileAttributesW (lpszVolume);
+ if (INVALID_FILE_ATTRIBUTES != dwFileAttrib)
+ {
+ if (dwFileAttrib & (FILE_ATTRIBUTE_COMPRESSED | FILE_ATTRIBUTE_SPARSE_FILE))
+ VolExpandParam.bDisableQuickExpand = TRUE;
+ }
+ }
+
while (1)
{
uint64 newVolumeSize;
@@ -716,34 +771,46 @@ void ExpandVolumeWizard (HWND hwndDlg, wchar_t *lpszVolume)
newVolumeSize = VolExpandParam.newSize;
if ( !bIsDevice )
{
- if ( newVolumeSize < hostSize + TC_MINVAL_FS_EXPAND)
+ if ( (newVolumeSize < hostSize + TC_MINVAL_FS_EXPAND) && ((hostSize == volSize) || (newVolumeSize != hostSize) || ((hostSize - volSize) < TC_MINVAL_FS_EXPAND)))
{
- StringCbPrintfW(szTmp,sizeof(szTmp),L"New volume size too small, must be at least %I64u kB larger than the current size.",TC_MINVAL_FS_EXPAND/BYTES_PER_KB);
+ StringCbPrintfW(szTmp,sizeof(szTmp),GetString("EXPANDER_ERROR_VOLUME_SIZE_TOO_SMALL"),TC_MINVAL_FS_EXPAND/BYTES_PER_KB);
MessageBoxW (hwndDlg, szTmp, lpszTitle, MB_OK | MB_ICONEXCLAMATION );
continue;
}
if ( newVolumeSize - hostSize > hostSizeFree )
{
- StringCbPrintfW(szTmp,sizeof(szTmp),L"New volume size too large, not enough space on host drive.");
+ StringCbPrintfW(szTmp,sizeof(szTmp), GetString("EXPANDER_ERROR_VOLUME_SIZE_TOO_LARGE"));
MessageBoxW (hwndDlg, szTmp, lpszTitle, MB_OK | MB_ICONEXCLAMATION );
continue;
}
if ( newVolumeSize>maxSizeFS )
{
- StringCbPrintfW(szTmp,sizeof(szTmp),L"Maximum file size of %I64u MB on host drive exceeded.",maxSizeFS/BYTES_PER_MB);
+ StringCbPrintfW(szTmp,sizeof(szTmp), GetString("EXPANDER_ERROR_MAX_FILE_SIZE_EXCEEDED"),maxSizeFS/BYTES_PER_MB);
MessageBoxW (hwndDlg, L"!\n",lpszTitle, MB_OK | MB_ICONEXCLAMATION );
continue;
}
+
+ if (VolExpandParam.bQuickExpand && !bSeManageVolumeNameSet)
+ {
+ if (!SetPrivilege (SE_MANAGE_VOLUME_NAME, TRUE))
+ {
+ MessageBoxW (hwndDlg, GetString("EXPANDER_ERROR_QUICKEXPAND_PRIVILEGES"),lpszTitle, MB_OK | MB_ICONEXCLAMATION );
+ VolExpandParam.bQuickExpand = FALSE;
+ continue;
+ }
+
+ bSeManageVolumeNameSet = TRUE;
+ }
}
if ( newVolumeSize > TC_MAX_VOLUME_SIZE )
{
// note: current limit TC_MAX_VOLUME_SIZE is 1 PetaByte
- StringCbPrintfW(szTmp,sizeof(szTmp),L"Maximum VeraCrypt volume size of %I64u TB exceeded!\n",TC_MAX_VOLUME_SIZE/BYTES_PER_TB);
+ StringCbPrintfW(szTmp,sizeof(szTmp), GetString("EXPANDER_ERROR_MAX_VC_VOLUME_SIZE_EXCEEDED"),TC_MAX_VOLUME_SIZE/BYTES_PER_TB);
MessageBoxW (hwndDlg, szTmp,lpszTitle, MB_OK | MB_ICONEXCLAMATION );
if (bIsDevice)
break; // TODO: ask to limit volume size to TC_MAX_VOLUME_SIZE
continue;
diff --git a/src/ExpandVolume/ExpandVolume.c b/src/ExpandVolume/ExpandVolume.c
index 82c4207e..084de5f3 100644
--- a/src/ExpandVolume/ExpandVolume.c
+++ b/src/ExpandVolume/ExpandVolume.c
@@ -8,9 +8,9 @@
and also from the source code of extcv, which is Copyright (c) 2009-2010 Kih-Oskh
or Copyright (c) 2012-2013 Josef Schneider <josef@netpage.dk>
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2016 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2017 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages. */
@@ -36,8 +36,9 @@
#include "InitDataArea.h"
#include "ExpandVolume.h"
#include "Resource.h"
+#include <strsafe.h>
#ifndef SRC_POS
#define SRC_POS (__FUNCTION__ ":" TC_TO_STRING(__LINE__))
#endif
@@ -103,9 +104,9 @@ int MountVolTemp (HWND hwndDlg, wchar_t *volumePath, int *driveNo, Password *pas
mountOptions.PreserveTimestamp = bPreserveTimestamp;
mountOptions.PartitionInInactiveSysEncScope = FALSE;
mountOptions.UseBackupHeader = FALSE;
- if (MountVolume (hwndDlg, *driveNo, volumePath, password, pkcs5, pim, FALSE, FALSE, FALSE, TRUE, &mountOptions, FALSE, FALSE) < 1)
+ if (MountVolume (hwndDlg, *driveNo, volumePath, password, pkcs5, pim, FALSE, FALSE, TRUE, &mountOptions, FALSE, FALSE) < 1)
{
*driveNo = -3;
return ERR_VOL_MOUNT_FAILED;
}
@@ -388,9 +389,9 @@ int ExtendFileSystem (HWND hwndDlg , wchar_t *lpszVolume, Password *pVolumePassw
DWORD BytesPerSector;
// mount and resize file system
- DebugAddProgressDlgStatus (hwndDlg, L"Mounting volume ...\r\n");
+ DebugAddProgressDlgStatus (hwndDlg, GetString("EXPANDER_MOUNTING_VOLUME"));
nStatus=MountVolTemp(hwndDlg, lpszVolume, &driveNo, pVolumePassword, VolumePkcs5, VolumePim);
if (nStatus!=ERR_SUCCESS)
{
@@ -440,9 +441,15 @@ int ExtendFileSystem (HWND hwndDlg , wchar_t *lpszVolume, Password *pVolumePassw
nStatus = ERR_OS_ERROR;
goto error;
}
- DebugAddProgressDlgStatus (hwndDlg, L"Extending file system ...\r\n");
+ if ((BytesPerSector == 0) || (BytesPerSector > (DWORD)INT_MAX))
+ {
+ nStatus = ERR_SECTOR_SIZE_INCOMPATIBLE;
+ goto error;
+ }
+
+ DebugAddProgressDlgStatus (hwndDlg, GetString("EXPANDER_EXTENDING_FILESYSTEM"));
// extend volume
nStatus = FsctlExtendVolume(szVolumeGUID, newDataAreaSize/BytesPerSector );
@@ -451,9 +458,9 @@ error:
dwError = GetLastError();
if (driveNo>=0)
{
- DebugAddProgressDlgStatus (hwndDlg, L"Unmounting volume ...\r\n");
+ DebugAddProgressDlgStatus (hwndDlg, GetString("EXPANDER_UNMOUNTING_VOLUME"));
UnmountVolume (hwndDlg, driveNo, TRUE);
}
SetLastError (dwError);
@@ -491,17 +498,18 @@ error:
Remarks: a lot of code is from TrueCrypt 'Common\Password.c' :: ChangePwd()
*/
-static int ExpandVolume (HWND hwndDlg, wchar_t *lpszVolume, Password *pVolumePassword, int VolumePkcs5, int VolumePim, uint64 newHostSize, BOOL initFreeSpace)
+static int ExpandVolume (HWND hwndDlg, wchar_t *lpszVolume, Password *pVolumePassword, int VolumePkcs5, int VolumePim, uint64 newHostSize, BOOL initFreeSpace, BOOL bQuickExpand)
{
int nDosLinkCreated = 1, nStatus = ERR_OS_ERROR;
wchar_t szDiskFile[TC_MAX_PATH], szCFDevice[TC_MAX_PATH];
wchar_t szDosDevice[TC_MAX_PATH];
char buffer[TC_VOLUME_HEADER_EFFECTIVE_SIZE];
PCRYPTO_INFO cryptoInfo = NULL, ci = NULL;
void *dev = INVALID_HANDLE_VALUE;
DWORD dwError;
+ DWORD bytesRead;
BOOL bDevice;
uint64 hostSize=0, newDataAreaSize, currentVolSize;
DWORD HostSectorSize;
FILETIME ftCreationTime;
@@ -509,10 +517,13 @@ static int ExpandVolume (HWND hwndDlg, wchar_t *lpszVolume, Password *pVolumePas
FILETIME ftLastAccessTime;
BOOL bTimeStampValid = FALSE;
LARGE_INTEGER headerOffset;
BOOL backupHeader;
- byte *wipeBuffer = NULL;
+ uint8 *wipeBuffer = NULL;
uint32 workChunkSize = TC_VOLUME_HEADER_GROUP_SIZE;
+ CRYPTO_INFO tmpCI;
+ PCRYPTO_INFO cryptoInfoBackup = NULL;
+ BOOL bIsRamEncryptionEnabled = IsRamEncryptionEnabled();
if (pVolumePassword->Length == 0) return -1;
WaitCursor ();
@@ -520,9 +531,9 @@ static int ExpandVolume (HWND hwndDlg, wchar_t *lpszVolume, Password *pVolumePas
CreateFullVolumePath (szDiskFile, sizeof(szDiskFile), lpszVolume, &bDevice);
if (bDevice == FALSE)
{
- wcscpy (szCFDevice, szDiskFile);
+ StringCchCopyW (szCFDevice, ARRAYSIZE(szCFDevice), szDiskFile);
}
else
{
nDosLinkCreated = FakeDosNameForDevice (szDiskFile, szDosDevice, sizeof(szDosDevice), szCFDevice, sizeof(szCFDevice), FALSE);
@@ -534,8 +545,29 @@ static int ExpandVolume (HWND hwndDlg, wchar_t *lpszVolume, Password *pVolumePas
dev = CreateFile (szCFDevice, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
if (dev == INVALID_HANDLE_VALUE)
goto error;
+ else if (!bDevice && bPreserveTimestamp)
+ {
+ // ensure that Last Access and Last Time timestamps are not modified
+ // in order to preserve plausible deniability of hidden volumes (last password change time is stored in the volume header).
+ ftLastAccessTime.dwHighDateTime = 0xFFFFFFFF;
+ ftLastAccessTime.dwLowDateTime = 0xFFFFFFFF;
+
+ SetFileTime (dev, NULL, &ftLastAccessTime, NULL);
+
+ /* Remember the container modification/creation date and time, (used to reset file date and time of
+ file-hosted volumes after password change (or attempt to), in order to preserve plausible deniability
+ of hidden volumes (last password change time is stored in the volume header). */
+
+ if (GetFileTime ((HANDLE) dev, &ftCreationTime, &ftLastAccessTime, &ftLastWriteTime) == 0)
+ {
+ bTimeStampValid = FALSE;
+ MessageBoxW (hwndDlg, GetString ("GETFILETIME_FAILED_PW"), lpszTitle, MB_OK | MB_ICONEXCLAMATION);
+ }
+ else
+ bTimeStampValid = TRUE;
+ }
if (bDevice)
{
/* This is necessary to determine the hidden volume header offset */
@@ -558,20 +590,46 @@ static int ExpandVolume (HWND hwndDlg, wchar_t *lpszVolume, Password *pVolumePas
HostSectorSize = TC_SECTOR_SIZE_FILE_HOSTED_VOLUME; //TO DO: get the real host disk sector size
}
else
{
- DISK_GEOMETRY driveInfo;
+ BYTE dgBuffer[256];
- bResult = DeviceIoControl (dev, IOCTL_DISK_GET_DRIVE_GEOMETRY, NULL, 0,
- &driveInfo, sizeof (driveInfo), &dwResult, NULL);
+ bResult = DeviceIoControl (dev, IOCTL_DISK_GET_DRIVE_GEOMETRY_EX, NULL, 0,
+ dgBuffer, sizeof (dgBuffer), &dwResult, NULL);
if (!bResult)
- goto error;
-
- hostSize = driveInfo.Cylinders.QuadPart * driveInfo.BytesPerSector *
- driveInfo.SectorsPerTrack * driveInfo.TracksPerCylinder;
-
- HostSectorSize = driveInfo.BytesPerSector;
+ {
+ DISK_GEOMETRY geo;
+ if (DeviceIoControl (dev, IOCTL_DISK_GET_DRIVE_GEOMETRY, NULL, 0, (LPVOID) &geo, sizeof (geo), &dwResult, NULL))
+ {
+ hostSize = geo.Cylinders.QuadPart * geo.SectorsPerTrack * geo.TracksPerCylinder * geo.BytesPerSector;
+ HostSectorSize = geo.BytesPerSector;
+
+ if (CurrentOSMajor >= 6)
+ {
+ STORAGE_READ_CAPACITY storage = {0};
+
+ storage.Version = sizeof (STORAGE_READ_CAPACITY);
+ storage.Size = sizeof (STORAGE_READ_CAPACITY);
+ if (DeviceIoControl (dev, IOCTL_STORAGE_READ_CAPACITY, NULL, 0, (LPVOID) &storage, sizeof (storage), &dwResult, NULL)
+ && (dwResult >= sizeof (storage))
+ && (storage.Size == sizeof (STORAGE_READ_CAPACITY))
+ )
+ {
+ hostSize = storage.DiskLength.QuadPart;
+ }
+ }
+ }
+ else
+ {
+ goto error;
+ }
+ }
+ else
+ {
+ hostSize = ((PDISK_GEOMETRY_EX) dgBuffer)->DiskSize.QuadPart;
+ HostSectorSize = ((PDISK_GEOMETRY_EX) dgBuffer)->Geometry.BytesPerSector;
+ }
}
if (hostSize == 0)
{
@@ -601,22 +659,8 @@ static int ExpandVolume (HWND hwndDlg, wchar_t *lpszVolume, Password *pVolumePas
nStatus = ERR_CAPI_INIT_FAILED;
goto error;
}
- if (!bDevice && bPreserveTimestamp)
- {
- /* Remember the container modification/creation date and time, (used to reset file date and time of
- file-hosted volumes after password change (or attempt to), in order to preserve plausible deniability
- of hidden volumes (last password change time is stored in the volume header). */
-
- if (GetFileTime ((HANDLE) dev, &ftCreationTime, &ftLastAccessTime, &ftLastWriteTime) == 0)
- {
- bTimeStampValid = FALSE;
- MessageBoxW (hwndDlg, GetString ("GETFILETIME_FAILED_PW"), lpszTitle, MB_OK | MB_ICONEXCLAMATION);
- }
- else
- bTimeStampValid = TRUE;
- }
// Seek the volume header
headerOffset.QuadPart = TC_VOLUME_HEADER_OFFSET;
@@ -626,27 +670,43 @@ static int ExpandVolume (HWND hwndDlg, wchar_t *lpszVolume, Password *pVolumePas
goto error;
}
/* Read in volume header */
- nStatus = _lread ((HFILE) dev, buffer, sizeof (buffer));
- if (nStatus != sizeof (buffer))
+ if (!ReadEffectiveVolumeHeader (bDevice, dev, buffer, &bytesRead))
+ {
+ nStatus = ERR_OS_ERROR;
+ goto error;
+ }
+
+ if (bytesRead != sizeof (buffer))
{
// Windows may report EOF when reading sectors from the last cluster of a device formatted as NTFS
memset (buffer, 0, sizeof (buffer));
}
/* Try to decrypt the header */
- nStatus = ReadVolumeHeader (FALSE, buffer, pVolumePassword, VolumePkcs5, VolumePim, FALSE, &cryptoInfo, NULL);
+ nStatus = ReadVolumeHeader (FALSE, buffer, pVolumePassword, VolumePkcs5, VolumePim, &cryptoInfo, NULL);
if (nStatus == ERR_CIPHER_INIT_WEAK_KEY)
nStatus = 0; // We can ignore this error here
+ // if the volume master key is vulnerable, print a warning to inform the user
+ if ((nStatus == 0) && cryptoInfo->bVulnerableMasterKey)
+ {
+ DebugAddProgressDlgStatus(hwndDlg, GetString ("ERR_XTS_MASTERKEY_VULNERABLE_SHORT"));
+ }
+
if (nStatus != 0)
{
cryptoInfo = NULL;
goto error;
}
+ if (bIsRamEncryptionEnabled)
+ {
+ VcProtectKeys (cryptoInfo, VcGetEncryptionID (cryptoInfo));
+ }
+
if (cryptoInfo->HeaderFlags & TC_HEADER_FLAG_ENCRYPTED_SYSTEM)
{
nStatus = ERR_SYS_HIDVOL_HEAD_REENC_MODE_WRONG;
goto error;
@@ -716,15 +776,39 @@ static int ExpandVolume (HWND hwndDlg, wchar_t *lpszVolume, Password *pVolumePas
LARGE_INTEGER liNewSize;
liNewSize.QuadPart=(LONGLONG)newHostSize;
- // Preallocate the file
- if (!SetFilePointerEx (dev, liNewSize, NULL, FILE_BEGIN)
- || !SetEndOfFile (dev)
- || SetFilePointer (dev, 0, NULL, FILE_BEGIN) != 0)
+ if (hostSize != newHostSize)
{
- nStatus = ERR_OS_ERROR;
- goto error;
+ // Preallocate the file
+ if (!SetFilePointerEx (dev, liNewSize, NULL, FILE_BEGIN)
+ || !SetEndOfFile (dev))
+ {
+ nStatus = ERR_OS_ERROR;
+ goto error;
+ }
+
+ if (bQuickExpand)
+ {
+ if (!SetFileValidData (dev, liNewSize.QuadPart))
+ {
+ DebugAddProgressDlgStatus(hwndDlg, L"Warning: Failed to perform Quick Expand. Continuing with standard expanding...\r\n");
+ }
+ }
+
+ if (SetFilePointer (dev, 0, NULL, FILE_BEGIN) != 0)
+ {
+ nStatus = ERR_OS_ERROR;
+ goto error;
+ }
+ }
+ else
+ {
+ if (SetFilePointer (dev, 0, NULL, FILE_BEGIN) != 0)
+ {
+ nStatus = ERR_OS_ERROR;
+ goto error;
+ }
}
}
if (initFreeSpace)
@@ -741,9 +825,9 @@ static int ExpandVolume (HWND hwndDlg, wchar_t *lpszVolume, Password *pVolumePas
nStatus = ERR_OS_ERROR;
goto error;
}
- DebugAddProgressDlgStatus(hwndDlg, L"Writing random data to new space ...\r\n");
+ DebugAddProgressDlgStatus(hwndDlg, GetString ("EXPANDER_WRITING_RANDOM_DATA"));
SetFormatSectorSize(HostSectorSize);
nStatus = FormatNoFs (hwndDlg, startSector, num_sectors, dev, cryptoInfo, FALSE);
@@ -782,11 +866,20 @@ static int ExpandVolume (HWND hwndDlg, wchar_t *lpszVolume, Password *pVolumePas
/* note: updating the header is not neccessary for legay volumes */
while ( !cryptoInfo->LegacyVolume )
{
if (backupHeader)
- DebugAddProgressDlgStatus(hwndDlg, L"Writing re-encrypted backup header ...\r\n");
+ DebugAddProgressDlgStatus(hwndDlg, GetString("EXPANDER_WRITING_ENCRYPTED_BACKUP"));
else
- DebugAddProgressDlgStatus(hwndDlg, L"Writing re-encrypted primary header ...\r\n");
+ DebugAddProgressDlgStatus(hwndDlg, GetString("EXPANDER_WRITING_ENCRYPTED_PRIMARY"));
+
+ if (bIsRamEncryptionEnabled)
+ {
+ VirtualLock (&tmpCI, sizeof (CRYPTO_INFO));
+ memcpy (&tmpCI, cryptoInfo, sizeof (CRYPTO_INFO));
+ VcUnprotectKeys (&tmpCI, VcGetEncryptionID (cryptoInfo));
+ cryptoInfoBackup = cryptoInfo;
+ cryptoInfo = &tmpCI;
+ }
// Prepare new volume header
nStatus = CreateVolumeHeaderInMemory (hwndDlg, FALSE,
buffer,
@@ -805,8 +898,15 @@ static int ExpandVolume (HWND hwndDlg, wchar_t *lpszVolume, Password *pVolumePas
cryptoInfo->HeaderFlags,
cryptoInfo->SectorSize,
FALSE ); // use slow poll
+ if (bIsRamEncryptionEnabled)
+ {
+ cryptoInfo = cryptoInfoBackup;
+ burn (&tmpCI, sizeof (CRYPTO_INFO));
+ VirtualUnlock (&tmpCI, sizeof (CRYPTO_INFO));
+ }
+
if (ci != NULL)
crypto_close (ci);
if (nStatus != 0)
@@ -836,9 +936,24 @@ static int ExpandVolume (HWND hwndDlg, wchar_t *lpszVolume, Password *pVolumePas
//DebugAddProgressDlgStatus(hwndDlg, L"WriteRandomDataToReservedHeaderAreas() ...\r\n");
PCRYPTO_INFO dummyInfo = NULL;
LARGE_INTEGER hiddenOffset;
+ if (bIsRamEncryptionEnabled)
+ {
+ VirtualLock (&tmpCI, sizeof (CRYPTO_INFO));
+ memcpy (&tmpCI, cryptoInfo, sizeof (CRYPTO_INFO));
+ VcUnprotectKeys (&tmpCI, VcGetEncryptionID (cryptoInfo));
+ cryptoInfoBackup = cryptoInfo;
+ cryptoInfo = &tmpCI;
+ }
+
nStatus = WriteRandomDataToReservedHeaderAreas (hwndDlg, dev, cryptoInfo, newDataAreaSize, !backupHeader, backupHeader);
+ if (bIsRamEncryptionEnabled)
+ {
+ cryptoInfo = cryptoInfoBackup;
+ burn (&tmpCI, sizeof (CRYPTO_INFO));
+ VirtualUnlock (&tmpCI, sizeof (CRYPTO_INFO));
+ }
if (nStatus != ERR_SUCCESS)
goto error;
// write fake hidden volume header to protect against attacks that use statistical entropy
@@ -901,11 +1016,11 @@ static int ExpandVolume (HWND hwndDlg, wchar_t *lpszVolume, Password *pVolumePas
/* wipe old backup header */
if ( !cryptoInfo->LegacyVolume )
{
- byte wipeRandChars [TC_WIPE_RAND_CHAR_COUNT];
- byte wipeRandCharsUpdate [TC_WIPE_RAND_CHAR_COUNT];
- byte wipePass;
+ uint8 wipeRandChars [TC_WIPE_RAND_CHAR_COUNT];
+ uint8 wipeRandCharsUpdate [TC_WIPE_RAND_CHAR_COUNT];
+ uint8 wipePass;
UINT64_STRUCT unitNo;
LARGE_INTEGER offset;
WipeAlgorithmId wipeAlgorithm = TC_WIPE_35_GUTMANN;
@@ -916,11 +1031,11 @@ static int ExpandVolume (HWND hwndDlg, wchar_t *lpszVolume, Password *pVolumePas
nStatus = ERR_OS_ERROR;
goto error;
}
- DebugAddProgressDlgStatus(hwndDlg, L"Wiping old backup header ...\r\n");
+ DebugAddProgressDlgStatus(hwndDlg, GetString("EXPANDER_WIPING_OLD_HEADER"));
- wipeBuffer = (byte *) TCalloc (workChunkSize);
+ wipeBuffer = (uint8 *) TCalloc (workChunkSize);
if (!wipeBuffer)
{
nStatus = ERR_OUTOFMEMORY;
goto error;
@@ -1016,9 +1131,9 @@ void __cdecl volTransformThreadFunction (void *pExpandDlgParam)
EXPAND_VOL_THREAD_PARAMS *pParam=(EXPAND_VOL_THREAD_PARAMS *)pExpandDlgParam;
HWND hwndDlg = (HWND) pParam->hwndDlg;
nStatus = ExpandVolume (hwndDlg, (wchar_t*)pParam->szVolumeName, pParam->pVolumePassword,
- pParam->VolumePkcs5, pParam->VolumePim, pParam->newSize, pParam->bInitFreeSpace );
+ pParam->VolumePkcs5, pParam->VolumePim, pParam->newSize, pParam->bInitFreeSpace, pParam->bQuickExpand );
if (nStatus!=ERR_SUCCESS && nStatus!=ERR_USER_ABORT)
handleError (hwndDlg, nStatus, SRC_POS);
diff --git a/src/ExpandVolume/ExpandVolume.h b/src/ExpandVolume/ExpandVolume.h
index 8a9ace64..668eb79d 100644
--- a/src/ExpandVolume/ExpandVolume.h
+++ b/src/ExpandVolume/ExpandVolume.h
@@ -8,9 +8,9 @@
and also from the source code of extcv, which is Copyright (c) 2009-2010 Kih-Oskh
or Copyright (c) 2012-2013 Josef Schneider <josef@netpage.dk>
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2016 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2017 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages. */
@@ -39,8 +39,10 @@ typedef struct
enum EV_FileSystem FileSystem;
BOOL bIsDevice;
BOOL bIsLegacy;
BOOL bInitFreeSpace;
+ BOOL bQuickExpand;
+ BOOL bDisableQuickExpand;
Password *pVolumePassword;
int VolumePkcs5;
int VolumePim;
HWND hwndDlg;
diff --git a/src/ExpandVolume/ExpandVolume.rc b/src/ExpandVolume/ExpandVolume.rc
index 3183c209..ee5efc41 100644
--- a/src/ExpandVolume/ExpandVolume.rc
+++ b/src/ExpandVolume/ExpandVolume.rc
@@ -6,9 +6,9 @@
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
-#include "afxres.h"
+#include "winres.h"
#include "..\\common\\resource.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
@@ -37,13 +37,14 @@ BEGIN
CONTROL "&MB",IDC_MB,"Button",BS_AUTORADIOBUTTON,209,105,38,10
CONTROL "&GB",IDC_GB,"Button",BS_AUTORADIOBUTTON,248,105,38,10
CONTROL "&TB",IDC_TB,"Button",BS_AUTORADIOBUTTON,288,105,38,10
CONTROL "Fill new space with random data",IDC_INIT_NEWSPACE,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,30,127,118,10
- DEFPUSHBUTTON "Continue",IDOK,15,238,84,18
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,30,120,276,10
+ CONTROL "Quick Expand",IDC_QUICKEXPAND,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_DISABLED | WS_TABSTOP,30,132,276,10
+ DEFPUSHBUTTON "Continue",IDC_CONTINUE,15,238,84,18
PUSHBUTTON "Cancel",IDCANCEL,277,238,84,18
LTEXT "Help Text",IDC_BOX_HELP,15,165,346,58,0,WS_EX_CLIENTEDGE
- GROUPBOX "Enter new volume size",IDC_STATIC,15,83,346,63
+ GROUPBOX "Enter new volume size",IDT_NEW_SIZE_BOX_TITLE,15,83,346,63
RTEXT "Current size: ",IDT_CURRENT_SIZE,27,42,46,8
CONTROL "",IDC_EXPAND_VOLUME_OLDSIZE,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,80,42,275,8,WS_EX_TRANSPARENT
RTEXT "New size: ",IDT_NEW_SIZE,28,54,45,8
LTEXT "",IDC_EXPAND_VOLUME_NEWSIZE,80,54,275,8,0,WS_EX_TRANSPARENT
@@ -71,9 +72,9 @@ BEGIN
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,1,0,373,147
GROUPBOX "",IDC_STATIC,282,238,88,24
GROUPBOX "",IDC_STATIC,6,238,88,24
GROUPBOX "",IDC_STATIC,1,147,373,123,BS_CENTER
- LTEXT "1. Select the VeraCrypt volume to be expanded\n2. Click the 'Mount' button",IDC_STATIC,15,156,293,21
+ LTEXT "1. Select the VeraCrypt volume to be expanded\n2. Click the 'Mount' button",IDC_STEPSEXPAND,15,156,293,21
LTEXT "Static",IDC_INFOEXPAND,8,6,361,134,SS_NOPREFIX | SS_SUNKEN,WS_EX_STATICEDGE
END
IDD_PASSWORD_DLG DIALOGEX 0, 0, 322, 107
@@ -82,9 +83,8 @@ CAPTION "Enter VeraCrypt Volume Password"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
EDITTEXT IDC_PASSWORD,69,8,166,14,ES_PASSWORD | ES_AUTOHSCROLL
COMBOBOX IDC_PKCS5_PRF_ID,69,26,86,90,CBS_DROPDOWNLIST | WS_TABSTOP
- CONTROL "TrueCrypt Mode",IDC_TRUECRYPT_MODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,159,28,76,10
EDITTEXT IDC_PIM,69,43,42,14,ES_RIGHT | ES_PASSWORD | ES_AUTOHSCROLL | ES_NUMBER | NOT WS_VISIBLE
CONTROL "Use P&IM",IDC_PIM_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,70,49,97,10
CONTROL "Cache passwords and keyfil&es in memory",IDC_CACHE,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,70,62,153,10
@@ -119,16 +119,16 @@ BEGIN
GROUPBOX "",IDC_STATIC,15,84,346,49
RTEXT "Volume: ",IDT_VOL_NAME,31,16,42,8
GROUPBOX "",IDC_STATIC,15,7,346,72
CONTROL "",IDC_EXPAND_VOLUME_NAME,"Static",SS_SIMPLE | WS_GROUP,80,16,275,8,WS_EX_TRANSPARENT
- DEFPUSHBUTTON "Continue",IDOK,15,247,84,18
+ DEFPUSHBUTTON "Continue",IDC_CONTINUE,15,247,84,18
PUSHBUTTON "Cancel",IDCANCEL,277,247,84,18
EDITTEXT IDC_BOX_STATUS,15,176,346,66,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | ES_WANTRETURN | WS_VSCROLL
CONTROL "",IDC_EXPAND_VOLUME_INITSPACE,"Static",SS_SIMPLE | WS_GROUP,80,64,275,8,WS_EX_TRANSPARENT
RTEXT "Fill new space: ",IDT_INIT_SPACE,20,64,53,8
RTEXT "File system: ",IDT_FILE_SYS,31,28,42,8
CONTROL "",IDC_EXPAND_FILE_SYSTEM,"Static",SS_SIMPLE | WS_GROUP,80,28,275,8,WS_EX_TRANSPARENT
- RTEXT "Random Pool: ",IDT_RANDOM_POOL2,20,144,53,8
+ RTEXT "Random Pool: ",IDT_RANDOM_POOL,20,144,53,8
CONTROL "",IDC_RANDOM_BYTES,"Static",SS_SIMPLE | WS_GROUP,80,144,149,8,WS_EX_TRANSPARENT
CONTROL "Display pool content",IDC_DISPLAY_POOL_CONTENTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,236,142,125,12
GROUPBOX "Randomness Collected From Mouse Movements",IDT_ENTROPY_BAR,20,156,214,18
CONTROL "",IDC_ENTROPY_BAR,"msctls_progress32",WS_BORDER,31,165,193,6
@@ -140,9 +140,9 @@ END
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO
+GUIDELINES DESIGNINFO
BEGIN
IDD_SIZE_DIALOG, DIALOG
BEGIN
LEFTMARGIN, 15
@@ -191,10 +191,10 @@ IDR_MOUNT_RSRC_HEADER HEADER "resource.h"
// Version
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,20,2,0
- PRODUCTVERSION 1,20,2,0
+ FILEVERSION 1,26,17,2
+ PRODUCTVERSION 1,26,17,2
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
@@ -209,13 +209,13 @@ BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "IDRIX"
VALUE "FileDescription", "VeraCrypt Expander"
- VALUE "FileVersion", "1.20-BETA2"
+ VALUE "FileVersion", "1.26.17"
VALUE "LegalTrademarks", "VeraCrypt"
VALUE "OriginalFilename", "VeraCryptExpander.exe"
VALUE "ProductName", "VeraCrypt"
- VALUE "ProductVersion", "1.20-BETA2"
+ VALUE "ProductVersion", "1.26.17"
END
END
BLOCK "VarFileInfo"
BEGIN
@@ -263,9 +263,9 @@ IDB_LOGO_288DPI BITMAP "Logo_288dpi.bmp"
//
// Menu
//
-IDR_MENU MENUEX
+IDR_MENU MENUEX
BEGIN
MENUITEM "About", IDM_ABOUT,MFT_STRING,MFS_ENABLED
MENUITEM "Homepage", IDM_HOMEPAGE,MFT_STRING | MFT_RIGHTJUSTIFY,MFS_ENABLED
END
@@ -275,9 +275,9 @@ END
//
// String Table
//
-STRINGTABLE
+STRINGTABLE
BEGIN
IDS_UACSTRING "VeraCrypt Expander"
END
diff --git a/src/ExpandVolume/ExpandVolume.vcproj b/src/ExpandVolume/ExpandVolume.vcproj
deleted file mode 100644
index 37b6f461..00000000
--- a/src/ExpandVolume/ExpandVolume.vcproj
+++ /dev/null
@@ -1,977 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="ExpandVolume"
- ProjectGUID="{9715FF1D-599B-4BBC-AD96-BEF6E08FF827}"
- RootNamespace="ExpandVolume"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- CommandLine=""
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- AdditionalIncludeDirectories=""
- TypeLibraryName="$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb"
- OutputDirectory=""
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\Common;..\Crypto;..\;..\pkcs11"
- PreprocessorDefinitions="VCEXPANDER;TCMOUNT;WIN32;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS"
- MinimalRebuild="true"
- ExceptionHandling="1"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- BufferSecurityCheck="true"
- EnableFunctionLevelLinking="false"
- UsePrecompiledHeader="0"
- BrowseInformation="0"
- BrowseInformationFile=""
- WarningLevel="3"
- DebugInformationFormat="4"
- DisableSpecificWarnings="4311"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="..\Crypto\Debug\crypto.lib mpr.lib"
- OutputFile="$(OutDir)/VeraCryptExpander.exe"
- LinkIncremental="2"
- GenerateManifest="false"
- IgnoreAllDefaultLibraries="false"
- DelayLoadDLLs="mpr.dll"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/ExpandVolume.pdb"
- SubSystem="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- AdditionalManifestFiles="VeraCryptExpander.manifest"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine="md &quot;..\Debug\Setup Files&quot; 2&gt;NUL:&#x0D;&#x0A;copy Debug\VeraCryptExpander.exe &quot;..\Debug\Setup Files&quot; &gt;NUL:&#x0D;&#x0A;"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- CommandLine=""
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- AdditionalIncludeDirectories=""
- TargetEnvironment="3"
- TypeLibraryName="$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb"
- OutputDirectory=""
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\Common;..\Crypto;..\;..\pkcs11"
- PreprocessorDefinitions="VCEXPANDER;TCMOUNT;WIN32;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS"
- MinimalRebuild="true"
- ExceptionHandling="1"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- BufferSecurityCheck="true"
- EnableFunctionLevelLinking="false"
- UsePrecompiledHeader="0"
- BrowseInformation="0"
- BrowseInformationFile=""
- WarningLevel="3"
- DebugInformationFormat="3"
- DisableSpecificWarnings="4311"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="..\Crypto\x64\Debug\crypto.lib mpr.lib"
- OutputFile="$(OutDir)/VeraCryptExpander.exe"
- LinkIncremental="2"
- GenerateManifest="false"
- IgnoreAllDefaultLibraries="false"
- DelayLoadDLLs="mpr.dll"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/ExpandVolume.pdb"
- SubSystem="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- AdditionalManifestFiles="VeraCryptExpander.manifest"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine="md &quot;..\Debug\Setup Files&quot; 2&gt;NUL:&#x0D;&#x0A;copy $(TargetPath) &quot;..\Debug\Setup Files\VeraCryptExpander-x64.exe&quot; &gt;NUL:&#x0D;&#x0A;"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- AdditionalIncludeDirectories=""
- TypeLibraryName="$(SolutionDir)/Mount/$(ProjectName).tlb"
- OutputDirectory=""
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalOptions="/w34189"
- Optimization="2"
- AdditionalIncludeDirectories="..\Common;..\Crypto;..\;..\pkcs11"
- PreprocessorDefinitions="VCEXPANDER;TCMOUNT;WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS"
- RuntimeLibrary="0"
- BufferSecurityCheck="true"
- UsePrecompiledHeader="0"
- AssemblerOutput="2"
- AssemblerListingLocation="$(IntDir)/"
- WarningLevel="3"
- DebugInformationFormat="0"
- DisableSpecificWarnings="4311"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="..\Crypto\Release\crypto.lib mpr.lib"
- OutputFile="$(OutDir)/VeraCryptExpander.exe"
- LinkIncremental="1"
- GenerateManifest="false"
- IgnoreAllDefaultLibraries="false"
- DelayLoadDLLs="mpr.dll"
- GenerateDebugInformation="false"
- GenerateMapFile="true"
- SubSystem="2"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- AdditionalManifestFiles="VeraCryptExpander.manifest"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine="copy Release\VeraCryptExpander.exe &quot;..\Release\Setup Files\&quot;"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- AdditionalIncludeDirectories=""
- TargetEnvironment="3"
- TypeLibraryName="$(SolutionDir)/Mount/$(ProjectName).tlb"
- OutputDirectory=""
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalOptions="/w34189"
- Optimization="2"
- AdditionalIncludeDirectories="..\Common;..\Crypto;..\;..\pkcs11"
- PreprocessorDefinitions="VCEXPANDER;TCMOUNT;WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS"
- RuntimeLibrary="0"
- BufferSecurityCheck="true"
- UsePrecompiledHeader="0"
- AssemblerOutput="2"
- AssemblerListingLocation="$(IntDir)/"
- WarningLevel="3"
- DebugInformationFormat="0"
- DisableSpecificWarnings="4311"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="..\Crypto\x64\Release\crypto.lib mpr.lib"
- OutputFile="$(OutDir)/VeraCryptExpander.exe"
- LinkIncremental="1"
- GenerateManifest="false"
- IgnoreAllDefaultLibraries="false"
- DelayLoadDLLs="mpr.dll"
- GenerateDebugInformation="false"
- GenerateMapFile="true"
- SubSystem="2"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- AdditionalManifestFiles="VeraCryptExpander.manifest"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine="copy $(TargetPath) &quot;..\Release\Setup Files\VeraCryptExpander-x64.exe&quot;"
- />
- </Configuration>
- </Configurations>
- <References>
- <ProjectReference
- ReferencedProjectIdentifier="{993245CF-6B70-47EE-91BB-39F8FC6DC0E7}"
- RelativePathToProject=".\Crypto\Crypto.vcproj"
- />
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath=".\DlgExpandVolume.cpp"
- >
- </File>
- <File
- RelativePath=".\ExpandVolume.c"
- >
- </File>
- <File
- RelativePath=".\InitDataArea.c"
- >
- </File>
- <File
- RelativePath=".\WinMain.cpp"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- </File>
- <Filter
- Name="Common"
- >
- <File
- RelativePath="..\Common\BaseCom.cpp"
- >
- </File>
- <File
- RelativePath="..\Common\BootEncryption.cpp"
- >
- </File>
- <File
- RelativePath="..\Common\Cmdline.c"
- >
- </File>
- <File
- RelativePath="..\Common\Combo.c"
- >
- </File>
- <File
- RelativePath="..\Common\Crc.c"
- >
- </File>
- <File
- RelativePath="..\Common\Crypto.c"
- >
- </File>
- <File
- RelativePath="..\Common\Dictionary.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\Common\Dlgcode.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\Common\EncryptionThreadPool.c"
- >
- </File>
- <File
- RelativePath="..\Common\Endian.c"
- >
- </File>
- <File
- RelativePath="..\Common\GfMul.c"
- >
- </File>
- <File
- RelativePath="..\Common\Keyfiles.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\Common\Language.c"
- >
- </File>
- <File
- RelativePath="..\Common\Password.c"
- >
- </File>
- <File
- RelativePath="..\Common\Pkcs5.c"
- >
- </File>
- <File
- RelativePath="..\Common\Progress.c"
- >
- </File>
- <File
- RelativePath="..\Common\Random.c"
- >
- </File>
- <File
- RelativePath="..\Common\Registry.c"
- >
- </File>
- <File
- RelativePath="..\Common\SecurityToken.cpp"
- >
- </File>
- <File
- RelativePath="..\Common\Tests.c"
- >
- </File>
- <File
- RelativePath="..\Common\Volumes.c"
- >
- </File>
- <File
- RelativePath="..\Common\Wipe.c"
- >
- </File>
- <File
- RelativePath="..\Common\Wipe.h"
- >
- </File>
- <File
- RelativePath="..\Common\Xml.c"
- >
- </File>
- <File
- RelativePath="..\Common\Xts.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Mount"
- >
- <File
- RelativePath="..\Mount\Favorites.cpp"
- >
- </File>
- <File
- RelativePath="..\Mount\Hotkeys.c"
- >
- </File>
- <File
- RelativePath="..\Mount\MainCom.cpp"
- >
- </File>
- <File
- RelativePath="..\Mount\MainCom.idl"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCMIDLTool"
- OutputDirectory="$(SolutionDir)/Mount"
- HeaderFileName="$(SolutionDir)/Mount/$(InputName)_h.h"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCMIDLTool"
- OutputDirectory="$(SolutionDir)/Mount"
- HeaderFileName="$(SolutionDir)/Mount/$(InputName)_h.h"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCMIDLTool"
- OutputDirectory="$(SolutionDir)/Mount"
- HeaderFileName="$(SolutionDir)/Mount/$(InputName)_h.h"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCMIDLTool"
- OutputDirectory="$(SolutionDir)/Mount"
- HeaderFileName="$(SolutionDir)/Mount/$(InputName)_h.h"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\Mount\Mount.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- </File>
- </Filter>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath="..\Common\Apidrvr.h"
- >
- </File>
- <File
- RelativePath="..\Common\BaseCom.h"
- >
- </File>
- <File
- RelativePath="..\Common\BootEncryption.h"
- >
- </File>
- <File
- RelativePath="..\Common\Cmdline.h"
- >
- </File>
- <File
- RelativePath="..\Common\Combo.h"
- >
- </File>
- <File
- RelativePath="..\Common\Common.h"
- >
- </File>
- <File
- RelativePath="..\Common\Crc.h"
- >
- </File>
- <File
- RelativePath="..\Common\Crypto.h"
- >
- </File>
- <File
- RelativePath="..\Common\Dictionary.h"
- >
- </File>
- <File
- RelativePath="..\Common\Dlgcode.h"
- >
- </File>
- <File
- RelativePath="..\Common\EncryptionThreadPool.h"
- >
- </File>
- <File
- RelativePath="..\Common\Exception.h"
- >
- </File>
- <File
- RelativePath=".\ExpandVolume.h"
- >
- </File>
- <File
- RelativePath="..\Common\GfMul.h"
- >
- </File>
- <File
- RelativePath=".\Hotkeys.h"
- >
- </File>
- <File
- RelativePath=".\InitDataArea.h"
- >
- </File>
- <File
- RelativePath="..\Common\Keyfiles.h"
- >
- </File>
- <File
- RelativePath="..\Common\Language.h"
- >
- </File>
- <File
- RelativePath="..\Mount\MainCom.h"
- >
- </File>
- <File
- RelativePath="..\Mount\Mount.h"
- >
- </File>
- <File
- RelativePath="..\Common\Password.h"
- >
- </File>
- <File
- RelativePath="..\Common\Pkcs5.h"
- >
- </File>
- <File
- RelativePath="..\Common\Progress.h"
- >
- </File>
- <File
- RelativePath="..\Common\Random.h"
- >
- </File>
- <File
- RelativePath="..\Common\Registry.h"
- >
- </File>
- <File
- RelativePath="..\Common\Resource.h"
- >
- </File>
- <File
- RelativePath=".\resource.h"
- >
- </File>
- <File
- RelativePath="..\Common\SecurityToken.h"
- >
- </File>
- <File
- RelativePath="..\Common\Tcdefs.h"
- >
- </File>
- <File
- RelativePath="..\Common\Tests.h"
- >
- </File>
- <File
- RelativePath="..\Common\Volumes.h"
- >
- </File>
- <File
- RelativePath="..\Common\Xml.h"
- >
- </File>
- <File
- RelativePath="..\Common\Xts.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- <File
- RelativePath=".\ExpandVolume.rc"
- >
- </File>
- <File
- RelativePath=".\Logo_288dpi.bmp"
- >
- </File>
- <File
- RelativePath=".\Logo_96dpi.bmp"
- >
- </File>
- <File
- RelativePath="..\Common\Textual_logo_288dpi.bmp"
- >
- </File>
- <File
- RelativePath="..\Common\Textual_logo_96dpi.bmp"
- >
- </File>
- <File
- RelativePath="..\Common\Textual_logo_background.bmp"
- >
- </File>
- <File
- RelativePath="..\Common\VeraCrypt.ico"
- >
- </File>
- <File
- RelativePath="..\Common\VeraCrypt_mounted.ico"
- >
- </File>
- <File
- RelativePath="..\Common\VeraCrypt_Volume.ico"
- >
- </File>
- <File
- RelativePath=".\VeraCryptExpander.manifest"
- >
- </File>
- <Filter
- Name="Common"
- >
- <File
- RelativePath="..\Common\Common.rc"
- >
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCResourceCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCResourceCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCResourceCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCResourceCompilerTool"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\Common\Language.xml"
- >
- </File>
- </Filter>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/src/ExpandVolume/ExpandVolume.vcxproj b/src/ExpandVolume/ExpandVolume.vcxproj
index 773f6115..fa553e62 100644
--- a/src/ExpandVolume/ExpandVolume.vcxproj
+++ b/src/ExpandVolume/ExpandVolume.vcxproj
@@ -1,18 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
+ <ProjectConfiguration Include="Debug|ARM64">
<Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
+ <Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
+ <ProjectConfiguration Include="ReleaseCustomEFI|ARM64">
+ <Configuration>ReleaseCustomEFI</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseCustomEFI|x64">
+ <Configuration>ReleaseCustomEFI</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
- <Platform>Win32</Platform>
+ <Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
@@ -21,148 +29,186 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{9715FF1D-599B-4BBC-AD96-BEF6E08FF827}</ProjectGuid>
<RootNamespace>ExpandVolume</RootNamespace>
<Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
+ <ProjectName>ExpandVolume</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
+ <SpectreMitigation>Spectre</SpectreMitigation>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
+ <SpectreMitigation>Spectre</SpectreMitigation>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</GenerateManifest>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Platform)\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(ProjectDir)$(Platform)\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Platform)\$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(ProjectDir)$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</GenerateManifest>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateManifest>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Platform)\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(ProjectDir)$(Platform)\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(ProjectDir)$(Platform)\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">$(ProjectDir)$(Platform)\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Platform)\$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(ProjectDir)$(Platform)\$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(ProjectDir)$(Platform)\$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">$(ProjectDir)$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">false</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</GenerateManifest>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">VeraCryptExpander</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">VeraCryptExpander</TargetName>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">true</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">true</GenerateManifest>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">VeraCryptExpander</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">VeraCryptExpander</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">VeraCryptExpander</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">VeraCryptExpander</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">VeraCryptExpander</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">VeraCryptExpander</TargetName>
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<CustomBuildStep>
<Command>
</Command>
</CustomBuildStep>
<Midl>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <TargetEnvironment>X64</TargetEnvironment>
<TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName>
<OutputDirectory>
</OutputDirectory>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>VCEXPANDER;TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<ExceptionHandling>Sync</ExceptionHandling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
- <FunctionLevelLinking>false</FunctionLevelLinking>
+ <FunctionLevelLinking>
+ </FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<BrowseInformation>
</BrowseInformation>
<BrowseInformationFile>
</BrowseInformationFile>
<WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4311;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
- <AdditionalDependencies>..\Crypto\Debug\crypto.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>..\Crypto\x64\Debug\crypto.lib;..\Common\x64\Debug\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)VeraCryptExpander.exe</OutputFile>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
- <DelayLoadDLLs>mpr.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+ <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)ExpandVolume.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>true</DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
+ <TargetMachine>MachineX64</TargetMachine>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
+ <GenerateMapFile>true</GenerateMapFile>
</Link>
<Manifest>
<AdditionalManifestFiles>VeraCryptExpander.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
</Manifest>
<PostBuildEvent>
<Command>md "..\Debug\Setup Files" 2&gt;NUL:
-copy Debug\VeraCryptExpander.exe "..\Debug\Setup Files" &gt;NUL:
+copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-x64.exe" &gt;NUL:
</Command>
</PostBuildEvent>
+ <ResourceCompile>
+ <PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<CustomBuildStep>
<Command>
</Command>
</CustomBuildStep>
<Midl>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <TargetEnvironment>X64</TargetEnvironment>
<TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName>
<OutputDirectory>
</OutputDirectory>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>VCEXPANDER;TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<ExceptionHandling>Sync</ExceptionHandling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
- <FunctionLevelLinking>false</FunctionLevelLinking>
+ <FunctionLevelLinking>
+ </FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<BrowseInformation>
</BrowseInformation>
@@ -172,109 +218,161 @@ copy Debug\VeraCryptExpander.exe "..\Debug\Setup Files" &gt;NUL:
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4311;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
- <AdditionalDependencies>..\Crypto\x64\Debug\crypto.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>..\Crypto\ARM64\Debug\crypto.lib;..\Common\ARM64\Debug\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)VeraCryptExpander.exe</OutputFile>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
- <DelayLoadDLLs>mpr.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+ <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)ExpandVolume.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>true</DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
+ <GenerateMapFile>true</GenerateMapFile>
</Link>
<Manifest>
<AdditionalManifestFiles>VeraCryptExpander.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
</Manifest>
<PostBuildEvent>
<Command>md "..\Debug\Setup Files" 2&gt;NUL:
-copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-x64.exe" &gt;NUL:
+copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-arm64.exe" &gt;NUL:
</Command>
</PostBuildEvent>
+ <ResourceCompile>
+ <PreprocessorDefinitions>WIN64;ARM64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <TargetEnvironment>X64</TargetEnvironment>
<TypeLibraryName>$(SolutionDir)/Mount/$(ProjectName).tlb</TypeLibraryName>
<OutputDirectory>
</OutputDirectory>
</Midl>
<ClCompile>
<AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions>
<Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>VCEXPANDER;TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<PrecompiledHeader>
</PrecompiledHeader>
<AssemblerOutput>All</AssemblerOutput>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>
- </DebugInformationFormat>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4311;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <ControlFlowGuard>Guard</ControlFlowGuard>
</ClCompile>
<Link>
- <AdditionalDependencies>..\Crypto\Release\crypto.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)VeraCryptExpander.exe</OutputFile>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
- <DelayLoadDLLs>mpr.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
- <GenerateDebugInformation>false</GenerateDebugInformation>
+ <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateMapFile>true</GenerateMapFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <RandomizedBaseAddress>true</RandomizedBaseAddress>
<DataExecutionPrevention>true</DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
+ <TargetMachine>MachineX64</TargetMachine>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
</Link>
<Manifest>
<AdditionalManifestFiles>VeraCryptExpander.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
</Manifest>
<PostBuildEvent>
- <Command>copy Release\VeraCryptExpander.exe "..\Release\Setup Files\"</Command>
+ <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCryptExpander-x64.exe"</Command>
</PostBuildEvent>
+ <ResourceCompile>
+ <PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<Midl>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <TargetEnvironment>X64</TargetEnvironment>
<TypeLibraryName>$(SolutionDir)/Mount/$(ProjectName).tlb</TypeLibraryName>
<OutputDirectory>
</OutputDirectory>
</Midl>
<ClCompile>
<AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions>
<Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>VCEXPANDER;TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<PrecompiledHeader>
</PrecompiledHeader>
<AssemblerOutput>All</AssemblerOutput>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>
- </DebugInformationFormat>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4311;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <ControlFlowGuard>Guard</ControlFlowGuard>
</ClCompile>
<Link>
- <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>..\Crypto\ARM64\Release\crypto.lib;..\Common\ARM64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)VeraCryptExpander.exe</OutputFile>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
- <DelayLoadDLLs>mpr.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
- <GenerateDebugInformation>false</GenerateDebugInformation>
+ <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateMapFile>true</GenerateMapFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <RandomizedBaseAddress>true</RandomizedBaseAddress>
+ <DataExecutionPrevention>true</DataExecutionPrevention>
+ <UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
+ </Link>
+ <Manifest>
+ <AdditionalManifestFiles>VeraCryptExpander.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
+ </Manifest>
+ <PostBuildEvent>
+ <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCryptExpander-arm64.exe"</Command>
+ </PostBuildEvent>
+ <ResourceCompile>
+ <PreprocessorDefinitions>WIN64;ARM64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">
+ <Midl>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(SolutionDir)/Mount/$(ProjectName).tlb</TypeLibraryName>
+ <OutputDirectory>
+ </OutputDirectory>
+ </Midl>
+ <ClCompile>
+ <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>VCEXPANDER;VC_EFI_CUSTOM_MODE;TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>true</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4311;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)VeraCryptExpander.exe</OutputFile>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <GenerateMapFile>true</GenerateMapFile>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>true</RandomizedBaseAddress>
<DataExecutionPrevention>true</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
</Link>
@@ -283,210 +381,114 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-x64.exe" &gt;NUL:
</Manifest>
<PostBuildEvent>
<Command>copy $(TargetPath) "..\Release\Setup Files\VeraCryptExpander-x64.exe"</Command>
</PostBuildEvent>
+ <ResourceCompile>
+ <PreprocessorDefinitions>VC_EFI_CUSTOM_MODE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
</ItemDefinitionGroup>
- <ItemGroup>
- <ProjectReference Include="..\Boot\Windows\Boot.vcxproj">
- <Project>{8b7f059f-e4c7-4e11-88f5-ee8b8433072e}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- <ProjectReference Include="..\Crypto\Crypto.vcxproj">
- <Project>{993245cf-6b70-47ee-91bb-39f8fc6dc0e7}</Project>
- <CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
- <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
- </ProjectReference>
- <ProjectReference Include="..\Driver\Driver.vcxproj">
- <Project>{ef5ef444-18d0-40d7-8dfa-775ec4448602}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- <ProjectReference Include="..\Format\Format.vcxproj">
- <Project>{9dc1abe2-d18b-48fb-81d2-8c50adc57bcf}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- <ProjectReference Include="..\Mount\Mount.vcxproj">
- <Project>{e4c40f94-e7f9-4981-86e4-186b46f993f3}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\Common\libzip\mkstemp.c">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_add.c" />
- <ClCompile Include="..\Common\libzip\zip_add_dir.c">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_add_entry.c" />
- <ClCompile Include="..\Common\libzip\zip_buffer.c" />
- <ClCompile Include="..\Common\libzip\zip_close.c" />
- <ClCompile Include="..\Common\libzip\zip_delete.c">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_dirent.c" />
- <ClCompile Include="..\Common\libzip\zip_dir_add.c">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_discard.c" />
- <ClCompile Include="..\Common\libzip\zip_entry.c" />
- <ClCompile Include="..\Common\libzip\zip_error.c" />
- <ClCompile Include="..\Common\libzip\zip_error_clear.c" />
- <ClCompile Include="..\Common\libzip\zip_error_get.c" />
- <ClCompile Include="..\Common\libzip\zip_error_get_sys_type.c" />
- <ClCompile Include="..\Common\libzip\zip_error_strerror.c" />
- <ClCompile Include="..\Common\libzip\zip_error_to_str.c" />
- <ClCompile Include="..\Common\libzip\zip_err_str.c" />
- <ClCompile Include="..\Common\libzip\zip_extra_field.c" />
- <ClCompile Include="..\Common\libzip\zip_extra_field_api.c" />
- <ClCompile Include="..\Common\libzip\zip_fclose.c" />
- <ClCompile Include="..\Common\libzip\zip_fdopen.c">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_filerange_crc.c" />
- <ClCompile Include="..\Common\libzip\zip_file_add.c" />
- <ClCompile Include="..\Common\libzip\zip_file_error_clear.c" />
- <ClCompile Include="..\Common\libzip\zip_file_error_get.c" />
- <ClCompile Include="..\Common\libzip\zip_file_get_comment.c" />
- <ClCompile Include="..\Common\libzip\zip_file_get_external_attributes.c" />
- <ClCompile Include="..\Common\libzip\zip_file_get_offset.c" />
- <ClCompile Include="..\Common\libzip\zip_file_rename.c" />
- <ClCompile Include="..\Common\libzip\zip_file_replace.c" />
- <ClCompile Include="..\Common\libzip\zip_file_set_comment.c" />
- <ClCompile Include="..\Common\libzip\zip_file_set_external_attributes.c" />
- <ClCompile Include="..\Common\libzip\zip_file_set_mtime.c" />
- <ClCompile Include="..\Common\libzip\zip_file_strerror.c" />
- <ClCompile Include="..\Common\libzip\zip_fopen.c" />
- <ClCompile Include="..\Common\libzip\zip_fopen_encrypted.c" />
- <ClCompile Include="..\Common\libzip\zip_fopen_index.c" />
- <ClCompile Include="..\Common\libzip\zip_fopen_index_encrypted.c" />
- <ClCompile Include="..\Common\libzip\zip_fread.c" />
- <ClCompile Include="..\Common\libzip\zip_get_archive_comment.c" />
- <ClCompile Include="..\Common\libzip\zip_get_archive_flag.c" />
- <ClCompile Include="..\Common\libzip\zip_get_compression_implementation.c" />
- <ClCompile Include="..\Common\libzip\zip_get_encryption_implementation.c" />
- <ClCompile Include="..\Common\libzip\zip_get_file_comment.c" />
- <ClCompile Include="..\Common\libzip\zip_get_name.c" />
- <ClCompile Include="..\Common\libzip\zip_get_num_entries.c" />
- <ClCompile Include="..\Common\libzip\zip_get_num_files.c" />
- <ClCompile Include="..\Common\libzip\zip_hash.c" />
- <ClCompile Include="..\Common\libzip\zip_io_util.c" />
- <ClCompile Include="..\Common\libzip\zip_memdup.c" />
- <ClCompile Include="..\Common\libzip\zip_name_locate.c" />
- <ClCompile Include="..\Common\libzip\zip_new.c" />
- <ClCompile Include="..\Common\libzip\zip_open.c" />
- <ClCompile Include="..\Common\libzip\zip_rename.c" />
- <ClCompile Include="..\Common\libzip\zip_replace.c" />
- <ClCompile Include="..\Common\libzip\zip_set_archive_comment.c" />
- <ClCompile Include="..\Common\libzip\zip_set_archive_flag.c" />
- <ClCompile Include="..\Common\libzip\zip_set_default_password.c" />
- <ClCompile Include="..\Common\libzip\zip_set_file_comment.c" />
- <ClCompile Include="..\Common\libzip\zip_set_file_compression.c" />
- <ClCompile Include="..\Common\libzip\zip_set_name.c" />
- <ClCompile Include="..\Common\libzip\zip_source_begin_write.c" />
- <ClCompile Include="..\Common\libzip\zip_source_buffer.c" />
- <ClCompile Include="..\Common\libzip\zip_source_call.c" />
- <ClCompile Include="..\Common\libzip\zip_source_close.c" />
- <ClCompile Include="..\Common\libzip\zip_source_commit_write.c" />
- <ClCompile Include="..\Common\libzip\zip_source_crc.c" />
- <ClCompile Include="..\Common\libzip\zip_source_deflate.c" />
- <ClCompile Include="..\Common\libzip\zip_source_error.c" />
- <ClCompile Include="..\Common\libzip\zip_source_filep.c">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">
+ <Midl>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <TypeLibraryName>$(SolutionDir)/Mount/$(ProjectName).tlb</TypeLibraryName>
+ <OutputDirectory>
+ </OutputDirectory>
+ </Midl>
+ <ClCompile>
+ <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>VCEXPANDER;VC_EFI_CUSTOM_MODE;TCMOUNT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>true</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4311;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_free.c" />
- <ClCompile Include="..\Common\libzip\zip_source_function.c" />
- <ClCompile Include="..\Common\libzip\zip_source_is_deleted.c" />
- <ClCompile Include="..\Common\libzip\zip_source_layered.c" />
- <ClCompile Include="..\Common\libzip\zip_source_open.c" />
- <ClCompile Include="..\Common\libzip\zip_source_pkware.c" />
- <ClCompile Include="..\Common\libzip\zip_source_read.c" />
- <ClCompile Include="..\Common\libzip\zip_source_remove.c" />
- <ClCompile Include="..\Common\libzip\zip_source_rollback_write.c" />
- <ClCompile Include="..\Common\libzip\zip_source_seek.c" />
- <ClCompile Include="..\Common\libzip\zip_source_seek_write.c" />
- <ClCompile Include="..\Common\libzip\zip_source_stat.c" />
- <ClCompile Include="..\Common\libzip\zip_source_supports.c" />
- <ClCompile Include="..\Common\libzip\zip_source_tell.c" />
- <ClCompile Include="..\Common\libzip\zip_source_tell_write.c" />
- <ClCompile Include="..\Common\libzip\zip_source_win32a.c" />
- <ClCompile Include="..\Common\libzip\zip_source_win32handle.c" />
- <ClCompile Include="..\Common\libzip\zip_source_win32utf8.c" />
- <ClCompile Include="..\Common\libzip\zip_source_win32w.c" />
- <ClCompile Include="..\Common\libzip\zip_source_window.c" />
- <ClCompile Include="..\Common\libzip\zip_source_write.c" />
- <ClCompile Include="..\Common\libzip\zip_source_zip.c" />
- <ClCompile Include="..\Common\libzip\zip_source_zip_new.c" />
- <ClCompile Include="..\Common\libzip\zip_stat.c" />
- <ClCompile Include="..\Common\libzip\zip_stat_index.c" />
- <ClCompile Include="..\Common\libzip\zip_stat_init.c" />
- <ClCompile Include="..\Common\libzip\zip_strerror.c" />
- <ClCompile Include="..\Common\libzip\zip_string.c" />
- <ClCompile Include="..\Common\libzip\zip_unchange.c" />
- <ClCompile Include="..\Common\libzip\zip_unchange_all.c" />
- <ClCompile Include="..\Common\libzip\zip_unchange_archive.c" />
- <ClCompile Include="..\Common\libzip\zip_unchange_data.c" />
- <ClCompile Include="..\Common\libzip\zip_utf-8.c" />
- <ClCompile Include="..\Common\zlib\adler32.c" />
- <ClCompile Include="..\Common\zlib\crc32.c" />
- <ClCompile Include="..\Common\zlib\deflate.c" />
- <ClCompile Include="..\Common\zlib\inffast.c" />
- <ClCompile Include="..\Common\zlib\inflate.c" />
- <ClCompile Include="..\Common\zlib\inftrees.c" />
- <ClCompile Include="..\Common\zlib\trees.c" />
- <ClCompile Include="..\Common\zlib\zutil.c" />
+ <Link>
+ <AdditionalDependencies>..\Crypto\AMD64\Release\crypto.lib;..\Common\AMD64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)VeraCryptExpander.exe</OutputFile>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <GenerateMapFile>true</GenerateMapFile>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>true</RandomizedBaseAddress>
+ <DataExecutionPrevention>true</DataExecutionPrevention>
+ <UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
+ </Link>
+ <Manifest>
+ <AdditionalManifestFiles>VeraCryptExpander.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
+ </Manifest>
+ <PostBuildEvent>
+ <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCryptExpander-arm64.exe"</Command>
+ </PostBuildEvent>
+ <ResourceCompile>
+ <PreprocessorDefinitions>VC_EFI_CUSTOM_MODE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\Common\CommandAPDU.cpp" />
+ <ClCompile Include="..\Common\EMVCard.cpp" />
+ <ClCompile Include="..\Common\EMVToken.cpp" />
+ <ClCompile Include="..\Common\PCSCException.cpp" />
+ <ClCompile Include="..\Common\ResponseAPDU.cpp" />
+ <ClCompile Include="..\Common\SCard.cpp" />
+ <ClCompile Include="..\Common\SCardLoader.cpp" />
+ <ClCompile Include="..\Common\SCardManager.cpp" />
+ <ClCompile Include="..\Common\SCardReader.cpp" />
+ <ClCompile Include="..\Common\TLVParser.cpp" />
+ <ClCompile Include="..\Common\Token.cpp" />
+ <ClCompile Include="..\Setup\SelfExtract.c" />
<ClCompile Include="DlgExpandVolume.cpp" />
<ClCompile Include="ExpandVolume.c" />
<ClCompile Include="InitDataArea.c" />
<ClCompile Include="WinMain.cpp">
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="..\Common\BaseCom.cpp" />
<ClCompile Include="..\Common\BootEncryption.cpp" />
<ClCompile Include="..\Common\Cmdline.c" />
<ClCompile Include="..\Common\Combo.c" />
<ClCompile Include="..\Common\Crc.c" />
<ClCompile Include="..\Common\Crypto.c" />
<ClCompile Include="..\Common\Dictionary.c">
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="..\Common\Dlgcode.c">
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="..\Common\EncryptionThreadPool.c" />
<ClCompile Include="..\Common\Endian.c" />
<ClCompile Include="..\Common\GfMul.c" />
<ClCompile Include="..\Common\Keyfiles.c">
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="..\Common\Language.c" />
<ClCompile Include="..\Common\Password.c" />
<ClCompile Include="..\Common\Pkcs5.c" />
@@ -502,21 +504,28 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-x64.exe" &gt;NUL:
<ClCompile Include="..\Mount\Favorites.cpp" />
<ClCompile Include="..\Mount\Hotkeys.c" />
<ClCompile Include="..\Mount\MainCom.cpp" />
<ClCompile Include="..\Mount\Mount.c">
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs>
</ClCompile>
</ItemGroup>
<ItemGroup>
- <ClInclude Include="..\Common\libzip\compat.h" />
- <ClInclude Include="..\Common\libzip\config.h" />
- <ClInclude Include="..\Common\libzip\zconf.h" />
- <ClInclude Include="..\Common\libzip\zip.h" />
- <ClInclude Include="..\Common\libzip\zipint.h" />
- <ClInclude Include="..\Common\libzip\zipwin32.h" />
+ <ClInclude Include="..\Common\CommandAPDU.h" />
+ <ClInclude Include="..\Common\EMVCard.h" />
+ <ClInclude Include="..\Common\EMVToken.h" />
+ <ClInclude Include="..\Common\PCSCException.h" />
+ <ClInclude Include="..\Common\ResponseAPDU.h" />
+ <ClInclude Include="..\Common\SCard.h" />
+ <ClInclude Include="..\Common\SCardLoader.h" />
+ <ClInclude Include="..\Common\SCardManager.h" />
+ <ClInclude Include="..\Common\SCardReader.h" />
+ <ClInclude Include="..\Common\TLVParser.h" />
+ <ClInclude Include="..\Common\Token.h" />
<ClInclude Include="..\Common\Wipe.h" />
<ClInclude Include="..\Common\Apidrvr.h" />
<ClInclude Include="..\Common\BaseCom.h" />
<ClInclude Include="..\Common\BootEncryption.h" />
@@ -528,20 +537,8 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-x64.exe" &gt;NUL:
<ClInclude Include="..\Common\Dictionary.h" />
<ClInclude Include="..\Common\Dlgcode.h" />
<ClInclude Include="..\Common\EncryptionThreadPool.h" />
<ClInclude Include="..\Common\Exception.h" />
- <ClInclude Include="..\Common\XUnzip.h" />
- <ClInclude Include="..\Common\XZip.h" />
- <ClInclude Include="..\Common\zlib\crc32.h" />
- <ClInclude Include="..\Common\zlib\deflate.h" />
- <ClInclude Include="..\Common\zlib\inffast.h" />
- <ClInclude Include="..\Common\zlib\inffixed.h" />
- <ClInclude Include="..\Common\zlib\inflate.h" />
- <ClInclude Include="..\Common\zlib\inftrees.h" />
- <ClInclude Include="..\Common\zlib\trees.h" />
- <ClInclude Include="..\Common\zlib\zconf.h" />
- <ClInclude Include="..\Common\zlib\zlib.h" />
- <ClInclude Include="..\Common\zlib\zutil.h" />
<ClInclude Include="ExpandVolume.h" />
<ClInclude Include="..\Common\GfMul.h" />
<ClInclude Include="Hotkeys.h" />
<ClInclude Include="InitDataArea.h" />
@@ -564,25 +561,31 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-x64.exe" &gt;NUL:
<ClInclude Include="..\Common\Xts.h" />
</ItemGroup>
<ItemGroup>
<Midl Include="..\Mount\MainCom.idl">
- <OutputDirectory Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)/Mount</OutputDirectory>
- <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)/Mount/%(Filename)_h.h</HeaderFileName>
<OutputDirectory Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)/Mount</OutputDirectory>
+ <OutputDirectory Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(SolutionDir)/Mount</OutputDirectory>
<HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)/Mount/%(Filename)_h.h</HeaderFileName>
- <OutputDirectory Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)/Mount</OutputDirectory>
- <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)/Mount/%(Filename)_h.h</HeaderFileName>
+ <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(SolutionDir)/Mount/%(Filename)_h.h</HeaderFileName>
<OutputDirectory Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)/Mount</OutputDirectory>
+ <OutputDirectory Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(SolutionDir)/Mount</OutputDirectory>
+ <OutputDirectory Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(SolutionDir)/Mount</OutputDirectory>
+ <OutputDirectory Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">$(SolutionDir)/Mount</OutputDirectory>
<HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)/Mount/%(Filename)_h.h</HeaderFileName>
+ <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(SolutionDir)/Mount/%(Filename)_h.h</HeaderFileName>
+ <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(SolutionDir)/Mount/%(Filename)_h.h</HeaderFileName>
+ <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">$(SolutionDir)/Mount/%(Filename)_h.h</HeaderFileName>
</Midl>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="ExpandVolume.rc" />
<ResourceCompile Include="..\Common\Common.rc">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">true</ExcludedFromBuild>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<None Include="Logo_288dpi.bmp" />
@@ -597,8 +600,22 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-x64.exe" &gt;NUL:
</ItemGroup>
<ItemGroup>
<Manifest Include="VeraCryptExpander.manifest" />
</ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\Common\Lzma.vcxproj">
+ <Project>{b896fe1f-6bf3-4f75-9148-f841829073d9}</Project>
+ </ProjectReference>
+ <ProjectReference Include="..\Crypto\Crypto.vcxproj">
+ <Project>{993245cf-6b70-47ee-91bb-39f8fc6dc0e7}</Project>
+ </ProjectReference>
+ <ProjectReference Include="..\Format\Format.vcxproj">
+ <Project>{9dc1abe2-d18b-48fb-81d2-8c50adc57bcf}</Project>
+ </ProjectReference>
+ <ProjectReference Include="..\Mount\Mount.vcxproj">
+ <Project>{e4c40f94-e7f9-4981-86e4-186b46f993f3}</Project>
+ </ProjectReference>
+ </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project> \ No newline at end of file
diff --git a/src/ExpandVolume/ExpandVolume.vcxproj.filters b/src/ExpandVolume/ExpandVolume.vcxproj.filters
index 34d2c578..17ed8515 100644
--- a/src/ExpandVolume/ExpandVolume.vcxproj.filters
+++ b/src/ExpandVolume/ExpandVolume.vcxproj.filters
@@ -21,13 +21,10 @@
</Filter>
<Filter Include="Resource Files\Common">
<UniqueIdentifier>{ece6c790-f488-400d-b92d-64f73ce9f990}</UniqueIdentifier>
</Filter>
- <Filter Include="Source Files\Common\zlib">
- <UniqueIdentifier>{044f5a5d-232b-4c85-b9ff-5b755d249450}</UniqueIdentifier>
- </Filter>
- <Filter Include="Source Files\Common\libzip">
- <UniqueIdentifier>{3431cd6c-72ca-4156-8311-37e469f29da9}</UniqueIdentifier>
+ <Filter Include="Source Files\Setup">
+ <UniqueIdentifier>{922a1924-e0f2-4829-8ed2-eb783e03e8a5}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="DlgExpandVolume.cpp">
@@ -125,343 +122,43 @@
</ClCompile>
<ClCompile Include="..\Mount\Mount.c">
<Filter>Source Files\Mount</Filter>
</ClCompile>
- <ClCompile Include="..\Common\zlib\adler32.c">
- <Filter>Source Files\Common\zlib</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\zlib\crc32.c">
- <Filter>Source Files\Common\zlib</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\zlib\deflate.c">
- <Filter>Source Files\Common\zlib</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\zlib\inffast.c">
- <Filter>Source Files\Common\zlib</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\zlib\inflate.c">
- <Filter>Source Files\Common\zlib</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\zlib\inftrees.c">
- <Filter>Source Files\Common\zlib</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\zlib\trees.c">
- <Filter>Source Files\Common\zlib</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\zlib\zutil.c">
- <Filter>Source Files\Common\zlib</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\mkstemp.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_add.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_add_dir.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_add_entry.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_buffer.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_close.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_delete.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_dir_add.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_dirent.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_discard.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_entry.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_err_str.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_error.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_error_clear.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_error_get.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_error_get_sys_type.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_error_strerror.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_error_to_str.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_extra_field.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_extra_field_api.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_fclose.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_fdopen.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_add.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_error_clear.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_error_get.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_get_comment.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_get_external_attributes.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_get_offset.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_rename.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_replace.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_set_comment.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_set_external_attributes.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_set_mtime.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_strerror.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_filerange_crc.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_fopen.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_fopen_encrypted.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_fopen_index.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_fopen_index_encrypted.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_fread.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_get_archive_comment.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_get_archive_flag.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_get_compression_implementation.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_get_encryption_implementation.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_get_file_comment.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_get_name.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_get_num_entries.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_get_num_files.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_hash.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_io_util.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_memdup.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_name_locate.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_new.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_open.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_rename.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_replace.c">
- <Filter>Source Files\Common\libzip</Filter>
+ <ClCompile Include="..\Setup\SelfExtract.c">
+ <Filter>Source Files\Setup</Filter>
</ClCompile>
- <ClCompile Include="..\Common\libzip\zip_set_archive_comment.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_set_archive_flag.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_set_default_password.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_set_file_comment.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_set_file_compression.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_set_name.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_begin_write.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_buffer.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_call.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_close.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_commit_write.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_crc.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_deflate.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_error.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_filep.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_free.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_function.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_is_deleted.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_layered.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_open.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_pkware.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_read.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_remove.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_rollback_write.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_seek.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_seek_write.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_stat.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_supports.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_tell.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_tell_write.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_win32a.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_win32handle.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_win32utf8.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_win32w.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_window.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_write.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_zip.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_zip_new.c">
- <Filter>Source Files\Common\libzip</Filter>
+ <ClCompile Include="..\Common\EMVToken.cpp">
+ <Filter>Source Files\Common</Filter>
</ClCompile>
- <ClCompile Include="..\Common\libzip\zip_stat.c">
- <Filter>Source Files\Common\libzip</Filter>
+ <ClCompile Include="..\Common\TLVParser.cpp">
+ <Filter>Source Files\Common</Filter>
</ClCompile>
- <ClCompile Include="..\Common\libzip\zip_stat_index.c">
- <Filter>Source Files\Common\libzip</Filter>
+ <ClCompile Include="..\Common\Token.cpp">
+ <Filter>Source Files\Common</Filter>
</ClCompile>
- <ClCompile Include="..\Common\libzip\zip_stat_init.c">
- <Filter>Source Files\Common\libzip</Filter>
+ <ClCompile Include="..\Common\CommandAPDU.cpp">
+ <Filter>Source Files\Common</Filter>
</ClCompile>
- <ClCompile Include="..\Common\libzip\zip_strerror.c">
- <Filter>Source Files\Common\libzip</Filter>
+ <ClCompile Include="..\Common\PCSCException.cpp">
+ <Filter>Source Files\Common</Filter>
</ClCompile>
- <ClCompile Include="..\Common\libzip\zip_string.c">
- <Filter>Source Files\Common\libzip</Filter>
+ <ClCompile Include="..\Common\ResponseAPDU.cpp">
+ <Filter>Source Files\Common</Filter>
</ClCompile>
- <ClCompile Include="..\Common\libzip\zip_unchange.c">
- <Filter>Source Files\Common\libzip</Filter>
+ <ClCompile Include="..\Common\SCardLoader.cpp">
+ <Filter>Source Files\Common</Filter>
</ClCompile>
- <ClCompile Include="..\Common\libzip\zip_unchange_all.c">
- <Filter>Source Files\Common\libzip</Filter>
+ <ClCompile Include="..\Common\SCardManager.cpp">
+ <Filter>Source Files\Common</Filter>
</ClCompile>
- <ClCompile Include="..\Common\libzip\zip_unchange_archive.c">
- <Filter>Source Files\Common\libzip</Filter>
+ <ClCompile Include="..\Common\SCardReader.cpp">
+ <Filter>Source Files\Common</Filter>
</ClCompile>
- <ClCompile Include="..\Common\libzip\zip_unchange_data.c">
- <Filter>Source Files\Common\libzip</Filter>
+ <ClCompile Include="..\Common\EMVCard.cpp">
+ <Filter>Source Files\Common</Filter>
</ClCompile>
- <ClCompile Include="..\Common\libzip\zip_utf-8.c">
- <Filter>Source Files\Common\libzip</Filter>
+ <ClCompile Include="..\Common\SCard.cpp">
+ <Filter>Source Files\Common</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\Common\Wipe.h">
@@ -565,61 +262,40 @@
</ClInclude>
<ClInclude Include="..\Common\Xts.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\Common\XZip.h">
+ <ClInclude Include="..\Common\EMVToken.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\Common\XUnzip.h">
+ <ClInclude Include="..\Common\TLVParser.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\Common\zlib\crc32.h">
- <Filter>Source Files\Common\zlib</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\zlib\deflate.h">
- <Filter>Source Files\Common\zlib</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\zlib\inffast.h">
- <Filter>Source Files\Common\zlib</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\zlib\inffixed.h">
- <Filter>Source Files\Common\zlib</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\zlib\inflate.h">
- <Filter>Source Files\Common\zlib</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\zlib\inftrees.h">
- <Filter>Source Files\Common\zlib</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\zlib\trees.h">
- <Filter>Source Files\Common\zlib</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\zlib\zconf.h">
- <Filter>Source Files\Common\zlib</Filter>
+ <ClInclude Include="..\Common\Token.h">
+ <Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\Common\zlib\zlib.h">
- <Filter>Source Files\Common\zlib</Filter>
+ <ClInclude Include="..\Common\CommandAPDU.h">
+ <Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\Common\zlib\zutil.h">
- <Filter>Source Files\Common\zlib</Filter>
+ <ClInclude Include="..\Common\PCSCException.h">
+ <Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\Common\libzip\compat.h">
- <Filter>Source Files\Common\libzip</Filter>
+ <ClInclude Include="..\Common\ResponseAPDU.h">
+ <Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\Common\libzip\config.h">
- <Filter>Source Files\Common\libzip</Filter>
+ <ClInclude Include="..\Common\SCardLoader.h">
+ <Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\Common\libzip\zconf.h">
- <Filter>Source Files\Common\libzip</Filter>
+ <ClInclude Include="..\Common\SCardManager.h">
+ <Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\Common\libzip\zip.h">
- <Filter>Source Files\Common\libzip</Filter>
+ <ClInclude Include="..\Common\SCardReader.h">
+ <Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\Common\libzip\zipint.h">
- <Filter>Source Files\Common\libzip</Filter>
+ <ClInclude Include="..\Common\EMVCard.h">
+ <Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\Common\libzip\zipwin32.h">
- <Filter>Source Files\Common\libzip</Filter>
+ <ClInclude Include="..\Common\SCard.h">
+ <Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Midl Include="..\Mount\MainCom.idl">
diff --git a/src/ExpandVolume/ExpandVolume.vcxproj.user b/src/ExpandVolume/ExpandVolume.vcxproj.user
index ace9a86a..88a55094 100644
--- a/src/ExpandVolume/ExpandVolume.vcxproj.user
+++ b/src/ExpandVolume/ExpandVolume.vcxproj.user
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup />
</Project> \ No newline at end of file
diff --git a/src/ExpandVolume/InitDataArea.c b/src/ExpandVolume/InitDataArea.c
index a687f3e0..d937e3fb 100644
--- a/src/ExpandVolume/InitDataArea.c
+++ b/src/ExpandVolume/InitDataArea.c
@@ -8,9 +8,9 @@
and also from the source code of extcv, which is Copyright (c) 2009-2010 Kih-Oskh
or Copyright (c) 2012-2013 Josef Schneider <josef@netpage.dk>
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2016 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2017 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages. */
@@ -55,8 +55,9 @@ int FormatNoFs (HWND hwndDlg, unsigned __int64 startSector, __int64 num_sectors,
CRYPTOPP_ALIGN_DATA(16) char originalK2[MASTER_KEYDATA_SIZE];
LARGE_INTEGER startOffset;
LARGE_INTEGER newOffset;
+ CRYPTO_INFO tmpCI;
// Seek to start sector
startOffset.QuadPart = startSector * FormatSectorSize;
if (!SetFilePointerEx ((HANDLE) dev, startOffset, &newOffset, FILE_BEGIN)
@@ -73,8 +74,16 @@ int FormatNoFs (HWND hwndDlg, unsigned __int64 startSector, __int64 num_sectors,
VirtualLock (originalK2, sizeof (originalK2));
memset (sector, 0, sizeof (sector));
+ if (IsRamEncryptionEnabled ())
+ {
+ VirtualLock (&tmpCI, sizeof (tmpCI));
+ memcpy (&tmpCI, cryptoInfo, sizeof (CRYPTO_INFO));
+ VcUnprotectKeys (&tmpCI, VcGetEncryptionID (cryptoInfo));
+ cryptoInfo = &tmpCI;
+ }
+
// Remember the original secondary key (XTS mode) before generating a temporary one
memcpy (originalK2, cryptoInfo->k2, sizeof (cryptoInfo->k2));
/* Fill the rest of the data area with random data */
@@ -96,14 +105,17 @@ int FormatNoFs (HWND hwndDlg, unsigned __int64 startSector, __int64 num_sectors,
retVal = EAInit (cryptoInfo->ea, temporaryKey, cryptoInfo->ks);
if (retVal != ERR_SUCCESS)
goto fail;
- if (!EAInitMode (cryptoInfo))
+ if (!EAInitMode (cryptoInfo, cryptoInfo->k2))
{
retVal = ERR_MODE_INIT_FAILED;
goto fail;
}
+ if (IsRamEncryptionEnabled ())
+ VcProtectKeys (cryptoInfo, VcGetEncryptionID (cryptoInfo));
+
while (num_sectors--)
{
if (WriteSector (dev, sector, write_buf, &write_buf_cnt, &nSecNo,
cryptoInfo) == FALSE)
@@ -124,9 +136,9 @@ int FormatNoFs (HWND hwndDlg, unsigned __int64 startSector, __int64 num_sectors,
// Reinitialize the encryption algorithm and mode in case NTFS format fails and the user wants to try FAT immediately
retVal = EAInit (cryptoInfo->ea, cryptoInfo->master_keydata, cryptoInfo->ks);
if (retVal != ERR_SUCCESS)
goto fail;
- if (!EAInitMode (cryptoInfo))
+ if (!EAInitMode (cryptoInfo, cryptoInfo->k2))
{
retVal = ERR_MODE_INIT_FAILED;
goto fail;
}
@@ -135,8 +147,13 @@ int FormatNoFs (HWND hwndDlg, unsigned __int64 startSector, __int64 num_sectors,
burn (originalK2, sizeof(originalK2));
VirtualUnlock (temporaryKey, sizeof (temporaryKey));
VirtualUnlock (originalK2, sizeof (originalK2));
TCfree (write_buf);
+ if (IsRamEncryptionEnabled ())
+ {
+ burn (&tmpCI, sizeof (CRYPTO_INFO));
+ VirtualUnlock (&tmpCI, sizeof (tmpCI));
+ }
return 0;
fail:
@@ -146,8 +163,13 @@ fail:
burn (originalK2, sizeof(originalK2));
VirtualUnlock (temporaryKey, sizeof (temporaryKey));
VirtualUnlock (originalK2, sizeof (originalK2));
TCfree (write_buf);
+ if (IsRamEncryptionEnabled ())
+ {
+ burn (&tmpCI, sizeof (CRYPTO_INFO));
+ VirtualUnlock (&tmpCI, sizeof (tmpCI));
+ }
SetLastError (err);
return (retVal ? retVal : ERR_OS_ERROR);
}
@@ -183,9 +205,9 @@ BOOL WriteSector (void *dev, char *sector,
static volatile BOOL WriteThreadRunning;
static volatile BOOL WriteThreadExitRequested;
static HANDLE WriteThreadHandle;
-static byte *WriteThreadBuffer;
+static uint8 *WriteThreadBuffer;
static HANDLE WriteBufferEmptyEvent;
static HANDLE WriteBufferFullEvent;
static volatile HANDLE WriteRequestHandle;
diff --git a/src/ExpandVolume/InitDataArea.h b/src/ExpandVolume/InitDataArea.h
index 49958a00..f8104150 100644
--- a/src/ExpandVolume/InitDataArea.h
+++ b/src/ExpandVolume/InitDataArea.h
@@ -5,9 +5,9 @@
is Copyright (c) 2009-2010 by Kih-Oskh or Copyright (c) 2012-2013 Josef Schneider
<josef@netpage.dk>
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2016 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2017 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/ExpandVolume/VeraCryptExpander.manifest b/src/ExpandVolume/VeraCryptExpander.manifest
index 36c64bca..4905cac0 100644
--- a/src/ExpandVolume/VeraCryptExpander.manifest
+++ b/src/ExpandVolume/VeraCryptExpander.manifest
@@ -1,13 +1,30 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
- <v3:trustInfo xmlns:v3="urn:schemas-microsoft-com:asm.v3">
- <v3:security>
- <v3:requestedPrivileges>
- <v3:requestedExecutionLevel level="requireAdministrator" />
- </v3:requestedPrivileges>
- </v3:security>
- </v3:trustInfo>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
+ <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
+ <security>
+ <requestedPrivileges>
+ <requestedExecutionLevel level="requireAdministrator" />
+ </requestedPrivileges>
+ </security>
+ </trustInfo>
+ <asmv3:application>
+ <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
+ <dpiAware>true</dpiAware>
+ </asmv3:windowsSettings>
+ </asmv3:application>
+ <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
+ <application>
+ <!-- Windows 10 and Windows 11 -->
+ <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
+ <!-- Windows 8.1 -->
+ <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
+ <!-- Windows 8 -->
+ <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
+ <!-- Windows 7 -->
+ <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
+ </application>
+ </compatibility>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
diff --git a/src/ExpandVolume/WinMain.cpp b/src/ExpandVolume/WinMain.cpp
index 5ab9718c..37cd11c8 100644
--- a/src/ExpandVolume/WinMain.cpp
+++ b/src/ExpandVolume/WinMain.cpp
@@ -8,9 +8,9 @@
and also from the source code of extcv, which is Copyright (c) 2009-2010 Kih-Oskh
or Copyright (c) 2012-2013 Josef Schneider <josef@netpage.dk>
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2016 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2017 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages. */
@@ -130,9 +130,9 @@ MountOptions mountOptions;
MountOptions defaultMountOptions;
KeyFile *FirstCmdKeyFile;
HBITMAP hbmLogoBitmapRescaled = NULL;
-wchar_t OrigKeyboardLayout [8+1] = L"00000409";
+wchar_t OrigKeyboardLayout [KL_NAMELENGTH] = L"00000409";
BOOL bKeyboardLayoutChanged = FALSE; /* TRUE if the keyboard layout was changed to the standard US keyboard layout (from any other layout). */
BOOL bKeybLayoutAltKeyWarningShown = FALSE; /* TRUE if the user has been informed that it is not possible to type characters by pressing keys while the right Alt key is held down. */
static KeyFilesDlgParam hidVolProtKeyFilesParam;
@@ -198,17 +198,42 @@ BOOL CheckSysEncMountWithoutPBA (const char *devicePath, BOOL quiet)
}
static void InitMainDialog (HWND hwndDlg)
{
+ MENUITEMINFOW info;
+ int i;
+ wchar_t *str;
+ int menuEntries[] = {IDM_ABOUT, IDM_HOMEPAGE};
/* Call the common dialog init code */
InitDialog (hwndDlg);
LocalizeDialog (hwndDlg, NULL);
+ DragAcceptFiles (hwndDlg, TRUE);
SendMessage (GetDlgItem (hwndDlg, IDC_VOLUME), CB_LIMITTEXT, TC_MAX_PATH, 0);
SetWindowTextW (hwndDlg, lpszTitle);
SendMessage (GetDlgItem (hwndDlg, IDC_INFOEXPAND), WM_SETFONT, (WPARAM) hBoldFont, (LPARAM) TRUE);
- SetWindowText (GetDlgItem (hwndDlg, IDC_INFOEXPAND), szExpandVolumeInfo);
+ SetWindowText (GetDlgItem (hwndDlg, IDC_INFOEXPAND), GetString("EXPANDER_INFO"));
+
+ // Localize menu strings
+ for (i = 0; i < array_capacity (menuEntries); i++)
+ {
+ str = (wchar_t *)GetDictionaryValueByInt (menuEntries[i]);
+ if (str)
+ {
+ ZeroMemory (&info, sizeof(info));
+ info.cbSize = sizeof (info);
+ info.fMask = MIIM_TYPE;
+ info.fType = MFT_STRING;
+ if (GetMenuItemInfoW (GetMenu (hwndDlg), menuEntries[i], FALSE, &info))
+ {
+ info.dwTypeData = str;
+ info.cch = (UINT) wcslen (str);
+
+ SetMenuItemInfoW (GetMenu (hwndDlg), menuEntries[i], FALSE, &info);
+ }
+ }
+ }
// Resize the logo bitmap if the user has a non-default DPI
if (ScreenDPI != USER_DEFAULT_SCREEN_DPI
&& hbmLogoBitmapRescaled == NULL) // If not re-called (e.g. after language pack change)
@@ -284,18 +309,21 @@ void LoadSettings (HWND hwndDlg)
bPreserveTimestamp = defaultMountOptions.PreserveTimestamp = ConfigReadInt ("PreserveTimestamps", TRUE);
bShowDisconnectedNetworkDrives = ConfigReadInt ("ShowDisconnectedNetworkDrives", FALSE);
bHideWaitingDialog = ConfigReadInt ("HideWaitingDialog", FALSE);
bUseSecureDesktop = ConfigReadInt ("UseSecureDesktop", FALSE);
+ bUseLegacyMaxPasswordLength = ConfigReadInt ("UseLegacyMaxPasswordLength", FALSE);
defaultMountOptions.Removable = ConfigReadInt ("MountVolumesRemovable", FALSE);
defaultMountOptions.ReadOnly = ConfigReadInt ("MountVolumesReadOnly", FALSE);
defaultMountOptions.ProtectHiddenVolume = FALSE;
defaultMountOptions.PartitionInInactiveSysEncScope = FALSE;
defaultMountOptions.RecoveryMode = FALSE;
defaultMountOptions.UseBackupHeader = FALSE;
+ defaultMountOptions.SkipCachedPasswords = FALSE;
mountOptions = defaultMountOptions;
CloseSecurityTokenSessionsAfterMount = ConfigReadInt ("CloseSecurityTokenSessionsAfterMount", 0);
+ EMVSupportEnabled = ConfigReadInt ("EMVSupportEnabled", 0);
{
char szTmp[TC_MAX_PATH] = {0};
WideCharToMultiByte (CP_UTF8, 0, SecurityTokenLibraryPath, -1, szTmp, sizeof (szTmp), NULL, NULL);
@@ -389,9 +417,8 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
WORD lw = LOWORD (wParam);
static Password *szXPwd;
static int *pkcs5;
static int *pim;
- static BOOL* truecryptMode;
switch (msg)
{
case WM_INITDIALOG:
@@ -399,9 +426,8 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
int i, nIndex;
szXPwd = ((PasswordDlgParam *) lParam) -> password;
pkcs5 = ((PasswordDlgParam *) lParam) -> pkcs5;
pim = ((PasswordDlgParam *) lParam) -> pim;
- truecryptMode = ((PasswordDlgParam *) lParam) -> truecryptMode;
LocalizeDialog (hwndDlg, "IDD_PASSWORD_DLG");
DragAcceptFiles (hwndDlg, TRUE);
if (PasswordDialogTitleStringId)
@@ -427,21 +453,21 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
/* Populate the PRF algorithms list */
HWND hComboBox = GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID);
SendMessage (hComboBox, CB_RESETCONTENT, 0, 0);
- nIndex = SendMessageW (hComboBox, CB_ADDSTRING, 0, (LPARAM) GetString ("AUTODETECTION"));
- SendMessage (hComboBox, CB_SETITEMDATA, nIndex, (LPARAM) 0);
+ nIndex =(int) SendMessageW (hComboBox, CB_ADDSTRING, 0, (LPARAM) GetString ("AUTODETECTION"));
+ SendMessage (hComboBox, CB_SETITEMDATA, (WPARAM) nIndex, (LPARAM) 0);
for (i = FIRST_PRF_ID; i <= LAST_PRF_ID; i++)
{
- nIndex = SendMessage (hComboBox, CB_ADDSTRING, 0, (LPARAM) get_pkcs5_prf_name(i));
- SendMessage (hComboBox, CB_SETITEMDATA, nIndex, (LPARAM) i);
+ nIndex = (int) SendMessage (hComboBox, CB_ADDSTRING, 0, (LPARAM) get_pkcs5_prf_name(i));
+ SendMessage (hComboBox, CB_SETITEMDATA, (WPARAM) nIndex, (LPARAM) i);
}
/* make autodetection the default */
SendMessage (hComboBox, CB_SETCURSEL, 0, 0);
- SendMessage (GetDlgItem (hwndDlg, IDC_PASSWORD), EM_LIMITTEXT, MAX_PASSWORD, 0);
+ ToNormalPwdField (hwndDlg, IDC_PASSWORD);
SendMessage (GetDlgItem (hwndDlg, IDC_CACHE), BM_SETCHECK, bCacheInDriver ? BST_CHECKED:BST_UNCHECKED, 0);
SendMessage (GetDlgItem (hwndDlg, IDC_PIM), EM_LIMITTEXT, MAX_PIM, 0);
SetPim (hwndDlg, IDC_PIM, *pim);
@@ -469,12 +495,8 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
EnableWindow (GetDlgItem (hwndDlg, IDC_CACHE), FALSE);
EnableWindow (GetDlgItem (hwndDlg, IDC_MOUNT_OPTIONS), FALSE);
}
- /* No support for mounting TrueCrypt volumes */
- SetCheckBox (hwndDlg, IDC_TRUECRYPT_MODE, FALSE);
- EnableWindow (GetDlgItem (hwndDlg, IDC_TRUECRYPT_MODE), FALSE);
-
if (!SetForegroundWindow (hwndDlg) && (FavoriteMountOnArrivalInProgress))
{
SetWindowPos (hwndDlg, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
@@ -493,17 +515,13 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
return 0;
case TC_APPMSG_PREBOOT_PASSWORD_MODE:
{
- /* No support for mounting TrueCrypt system partition */
- SetCheckBox (hwndDlg, IDC_TRUECRYPT_MODE, FALSE);
- EnableWindow (GetDlgItem (hwndDlg, IDC_TRUECRYPT_MODE), FALSE);
-
/* Repopulate the PRF algorithms list with algorithms that support system encryption */
HWND hComboBox = GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID);
SendMessage (hComboBox, CB_RESETCONTENT, 0, 0);
- int i, nIndex = SendMessageW (hComboBox, CB_ADDSTRING, 0, (LPARAM) GetString ("AUTODETECTION"));
+ int i, nIndex = (int) SendMessageW (hComboBox, CB_ADDSTRING, 0, (LPARAM) GetString ("AUTODETECTION"));
SendMessage (hComboBox, CB_SETITEMDATA, nIndex, (LPARAM) 0);
BOOL bIsGPT = FALSE;
try
@@ -516,10 +534,10 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
for (i = FIRST_PRF_ID; i <= LAST_PRF_ID; i++)
{
if (bIsGPT || HashForSystemEncryption(i))
{
- nIndex = SendMessage (hComboBox, CB_ADDSTRING, 0, (LPARAM) get_pkcs5_prf_name(i));
- SendMessage (hComboBox, CB_SETITEMDATA, nIndex, (LPARAM) i);
+ nIndex = (int) SendMessage (hComboBox, CB_ADDSTRING, 0, (LPARAM) get_pkcs5_prf_name(i));
+ SendMessage (hComboBox, CB_SETITEMDATA, (WPARAM) nIndex, (LPARAM) i);
}
}
/* make autodetection the default */
@@ -533,11 +551,14 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
tmp [MAX_PASSWORD] = 0;
SetWindowText (GetDlgItem (hwndDlg, IDC_PASSWORD), tmp);
SetWindowText (GetDlgItem (hwndDlg, IDC_PASSWORD), L"");
- StringCbPrintfW (OrigKeyboardLayout, sizeof(OrigKeyboardLayout),L"%08X", (DWORD) GetKeyboardLayout (NULL) & 0xFFFF);
+ if (!GetKeyboardLayoutNameW(OrigKeyboardLayout))
+ {
+ StringCbPrintfW(OrigKeyboardLayout, sizeof(OrigKeyboardLayout), L"%08X", (DWORD) (DWORD_PTR) GetKeyboardLayout(NULL) & 0xFFFF);
+ }
- DWORD keybLayout = (DWORD) LoadKeyboardLayout (L"00000409", KLF_ACTIVATE);
+ DWORD keybLayout = (DWORD) (DWORD_PTR) LoadKeyboardLayout (L"00000409", KLF_ACTIVATE);
if (keybLayout != 0x00000409 && keybLayout != 0x04090409)
{
Error ("CANT_CHANGE_KEYB_LAYOUT_FOR_SYS_ENCRYPTION", hwndDlg);
@@ -575,9 +596,9 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
{
case TIMER_ID_KEYB_LAYOUT_GUARD:
if (bPrebootPasswordDlgMode)
{
- DWORD keybLayout = (DWORD) GetKeyboardLayout (NULL);
+ DWORD keybLayout = (DWORD) (DWORD_PTR) GetKeyboardLayout (NULL);
if (keybLayout != 0x00000409 && keybLayout != 0x04090409)
{
// Keyboard layout is not standard US
@@ -588,9 +609,9 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
tmp [MAX_PASSWORD] = 0;
SetWindowText (GetDlgItem (hwndDlg, IDC_PASSWORD), tmp);
SetWindowText (GetDlgItem (hwndDlg, IDC_PASSWORD), L"");
- keybLayout = (DWORD) LoadKeyboardLayout (L"00000409", KLF_ACTIVATE);
+ keybLayout = (DWORD) (DWORD_PTR) LoadKeyboardLayout (L"00000409", KLF_ACTIVATE);
if (keybLayout != 0x00000409 && keybLayout != 0x04090409)
{
KillTimer (hwndDlg, TIMER_ID_KEYB_LAYOUT_GUARD);
@@ -672,38 +693,21 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
wchar_t tmp[MAX_PASSWORD+1];
if (lw == IDOK)
{
+ int iMaxPasswordLength = (bUseLegacyMaxPasswordLength)? MAX_LEGACY_PASSWORD : MAX_PASSWORD;
if (mountOptions.ProtectHiddenVolume && hidVolProtKeyFilesParam.EnableKeyFiles)
KeyFilesApply (hwndDlg, &mountOptions.ProtectedHidVolPassword, hidVolProtKeyFilesParam.FirstKeyFile, PasswordDlgVolume);
- if (GetPassword (hwndDlg, IDC_PASSWORD, (LPSTR) szXPwd->Text, MAX_PASSWORD + 1, TRUE))
- szXPwd->Length = strlen ((char *) szXPwd->Text);
+ if (GetPassword (hwndDlg, IDC_PASSWORD, (LPSTR) szXPwd->Text, iMaxPasswordLength + 1, FALSE, TRUE))
+ szXPwd->Length = (unsigned __int32) (strlen ((char *) szXPwd->Text));
else
return 1;
bCacheInDriver = IsButtonChecked (GetDlgItem (hwndDlg, IDC_CACHE));
*pkcs5 = (int) SendMessage (GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID), CB_GETITEMDATA, SendMessage (GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID), CB_GETCURSEL, 0, 0), 0);
- *truecryptMode = GetCheckBox (hwndDlg, IDC_TRUECRYPT_MODE);
-
- *pim = GetPim (hwndDlg, IDC_PIM);
-
- /* check that PRF is supported in TrueCrypt Mode */
- if ( (*truecryptMode)
- && ((!is_pkcs5_prf_supported(*pkcs5, TRUE, PRF_BOOT_NO)) || (mountOptions.ProtectHiddenVolume && !is_pkcs5_prf_supported(mountOptions.ProtectedHidVolPkcs5Prf, TRUE, PRF_BOOT_NO)))
- )
- {
- Error ("ALGO_NOT_SUPPORTED_FOR_TRUECRYPT_MODE", hwndDlg);
- return 1;
- }
- if ( (*truecryptMode)
- && (*pim != 0)
- )
- {
- Error ("PIM_NOT_SUPPORTED_FOR_TRUECRYPT_MODE", hwndDlg);
- return 1;
- }
+ *pim = GetPim (hwndDlg, IDC_PIM, 0);
}
// Attempt to wipe password stored in the input field buffer
wmemset (tmp, L'X', MAX_PASSWORD);
@@ -800,20 +804,19 @@ int RestoreVolumeHeader (HWND hwndDlg, char *lpszVolume)
// dummy
return 0;
}
-int ExtcvAskVolumePassword (HWND hwndDlg, const wchar_t* fileName, Password *password, int *pkcs5, int *pim, BOOL* truecryptMode, char *titleStringId, BOOL enableMountOptions)
+int ExtcvAskVolumePassword (HWND hwndDlg, const wchar_t* fileName, Password *password, int *pkcs5, int *pim, char *titleStringId, BOOL enableMountOptions)
{
- int result;
+ INT_PTR result;
PasswordDlgParam dlgParam;
PasswordDialogTitleStringId = titleStringId;
PasswordDialogDisableMountOptions = !enableMountOptions;
dlgParam.password = password;
dlgParam.pkcs5 = pkcs5;
dlgParam.pim = pim;
- dlgParam.truecryptMode = truecryptMode;
StringCbCopyW (PasswordDlgVolume, sizeof(PasswordDlgVolume), fileName);
result = SecureDesktopDialogBoxParam (hInst,
@@ -824,9 +827,8 @@ int ExtcvAskVolumePassword (HWND hwndDlg, const wchar_t* fileName, Password *pas
{
password->Length = 0;
*pkcs5 = 0;
*pim = 0;
- *truecryptMode = FALSE;
burn (&mountOptions.ProtectedHidVolPassword, sizeof (mountOptions.ProtectedHidVolPassword));
burn (&mountOptions.ProtectedHidVolPkcs5Prf, sizeof (mountOptions.ProtectedHidVolPkcs5Prf));
}
@@ -836,9 +838,9 @@ int ExtcvAskVolumePassword (HWND hwndDlg, const wchar_t* fileName, Password *pas
// GUI actions
static BOOL SelectContainer (HWND hwndDlg)
{
- if (BrowseFiles (hwndDlg, "OPEN_VOL_TITLE", szFileName, bHistory, FALSE, NULL) == FALSE)
+ if (BrowseFiles (hwndDlg, "OPEN_VOL_TITLE", szFileName, bHistory, FALSE) == FALSE)
return FALSE;
AddComboItem (GetDlgItem (hwndDlg, IDC_VOLUME), szFileName, bHistory);
VeraCryptExpander::EnableDisableButtons (hwndDlg);
@@ -849,9 +851,9 @@ static BOOL SelectContainer (HWND hwndDlg)
static BOOL SelectPartition (HWND hwndDlg)
{
RawDevicesDlgParam param;
param.pszFileName = szFileName;
- int nResult = DialogBoxParamW (hInst, MAKEINTRESOURCEW (IDD_RAWDEVICES_DLG), hwndDlg,
+ INT_PTR nResult = DialogBoxParamW (hInst, MAKEINTRESOURCEW (IDD_RAWDEVICES_DLG), hwndDlg,
(DLGPROC) RawDevicesDlgProc, (LPARAM) & param);
if (nResult == IDOK)
{
AddComboItem (GetDlgItem (hwndDlg, IDC_VOLUME), szFileName, bHistory);
@@ -862,8 +864,69 @@ static BOOL SelectPartition (HWND hwndDlg)
return FALSE;
}
+void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine)
+{
+ wchar_t **lpszCommandLineArgs = NULL; /* Array of command line arguments */
+ int nNoCommandLineArgs; /* The number of arguments in the array */
+
+ /* Extract command line arguments */
+ nNoCommandLineArgs = Win32CommandLine (&lpszCommandLineArgs);
+ if (nNoCommandLineArgs > 0)
+ {
+ int i;
+
+ for (i = 0; i < nNoCommandLineArgs; i++)
+ {
+ enum
+ {
+ OptionEnableMemoryProtection,
+ };
+
+ argument args[]=
+ {
+ { OptionEnableMemoryProtection, L"/protectMemory", NULL, FALSE },
+ };
+
+ argumentspec as;
+
+ int x;
+
+ if (lpszCommandLineArgs[i] == NULL)
+ continue;
+
+ as.args = args;
+ as.arg_cnt = sizeof(args)/ sizeof(args[0]);
+
+ x = GetArgumentID (&as, lpszCommandLineArgs[i]);
+
+ switch (x)
+ {
+
+ case OptionEnableMemoryProtection:
+ EnableMemoryProtection = TRUE;
+ break;
+
+ default:
+ DialogBoxParamW (hInst, MAKEINTRESOURCEW (IDD_COMMANDHELP_DLG), hwndDlg, (DLGPROC)
+ CommandHelpDlgProc, (LPARAM) &as);
+
+ exit(0);
+ }
+ }
+ }
+
+ /* Free up the command line arguments */
+ while (--nNoCommandLineArgs >= 0)
+ {
+ free (lpszCommandLineArgs[nNoCommandLineArgs]);
+ }
+
+ if (lpszCommandLineArgs)
+ free (lpszCommandLineArgs);
+}
+
/* Except in response to the WM_INITDIALOG and WM_ENDSESSION messages, the dialog box procedure
should return nonzero if it processes a message, and zero if it does not. */
BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
@@ -884,8 +947,11 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
bPreserveTimestamp = defaultMountOptions.PreserveTimestamp = TRUE;
bShowDisconnectedNetworkDrives = FALSE;
bHideWaitingDialog = FALSE;
bUseSecureDesktop = FALSE;
+ bUseLegacyMaxPasswordLength = FALSE;
+
+ VeraCryptExpander::ExtractCommandLine (hwndDlg, (wchar_t *) lParam);
if (UsePreferences)
{
// General preferences
@@ -895,8 +961,14 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
LoadDefaultKeyFilesParam ();
RestoreDefaultKeyFilesParam ();
}
+ if (EnableMemoryProtection)
+ {
+ /* Protect this process memory from being accessed by non-admin users */
+ ActivateMemoryProtection ();
+ }
+
InitMainDialog (hwndDlg);
// Quit
if (Quit)
@@ -920,8 +992,19 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
VeraCryptExpander::EndMainDlg (hwndDlg);
localcleanup ();
return 0;
+ case WM_DROPFILES:
+ {
+ HDROP hdrop = (HDROP) wParam;
+ DragQueryFile (hdrop, 0, szFileName, ARRAYSIZE (szFileName));
+ DragFinish (hdrop);
+
+ AddComboItem (GetDlgItem (hwndDlg, IDC_VOLUME), szFileName, bHistory);
+ SetFocus (GetDlgItem (hwndDlg, IDOK));
+ }
+ return 1;
+
case WM_COMMAND:
if (lw == IDCANCEL || lw == IDC_EXIT)
{
@@ -938,9 +1021,14 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
else
{
wchar_t fileName[MAX_PATH];
GetWindowText (GetDlgItem (hwndDlg, IDC_VOLUME), fileName, ARRAYSIZE (fileName));
- ExpandVolumeWizard(hwndDlg, fileName);
+ if (!VolumePathExists (fileName))
+ {
+ handleWin32Error (hwndDlg, SRC_POS);
+ }
+ else
+ ExpandVolumeWizard(hwndDlg, fileName);
}
return 1;
}
@@ -952,9 +1040,9 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
if (lw == IDM_HOMEPAGE )
{
ArrowWaitCursor ();
- ShellExecute (NULL, L"open", L"https://veracrypt.codeplex.com", NULL, NULL, SW_SHOWNORMAL);
+ SafeOpenURL (L"https://www.veracrypt.fr");
Sleep (200);
NormalCursor ();
return 1;
diff --git a/src/ExpandVolume/resource.h b/src/ExpandVolume/resource.h
index 993c414f..d4e1c1dd 100644
--- a/src/ExpandVolume/resource.h
+++ b/src/ExpandVolume/resource.h
@@ -42,26 +42,24 @@
#define IDC_MOUNTALL 1040
#define IDC_SELECT_FILE 1042
#define IDC_VOLUME_PROPERTIES 1044
#define IDT_RANDOM_POOL 1047
-#define IDT_VOL_NAME 1047
#define IDT_HEADER_KEY 1048
-#define IDT_CURRENT_SIZE 1048
-#define IDT_VOLUME 1049
#define IDT_MASTER_KEY 1049
-#define IDT_NEW_SIZE 1049
-#define IDT_PASSWORD 1050
#define IDT_DONE 1050
#define IDT_SPEED 1051
#define IDT_LEFT 1052
#define IDT_INIT_SPACE 1053
#define IDT_FILE_SYS 1054
-#define IDT_INIT_SPACE2 1055
-#define IDT_RANDOM_POOL2 1055
#define IDC_EXIT 1060
#define IDC_UNMOUNTALL 1063
#define IDC_SHOW_PASSWORD 1094
#define IDC_LOGO 1095
+#define IDT_VOL_NAME 1096
+#define IDT_CURRENT_SIZE 1097
+#define IDT_NEW_SIZE 1098
+#define IDT_VOLUME 1099
+#define IDT_PASSWORD 1100
#define IDC_SIZEDLG_TITLE 1111
#define IDC_INIT_NEWSPACE 1112
#define IDC_INFOEXPAND 1113
#define IDC_BOX_STATUS 1114
@@ -70,8 +68,11 @@
#define IDT_OLD_PIM 1142
#define IDC_OLD_PIM 1143
#define IDC_OLD_PIM_HELP 1144
#define ID_HOMEPAGE 1145
+#define IDC_QUICKEXPAND 1146
+#define IDC_STEPSEXPAND 1147
+#define IDT_NEW_SIZE_BOX_TITLE 1148
#define IDM_HELP 40001
#define IDM_ABOUT 40002
#define IDM_UNMOUNT_VOLUME 40003
#define IDM_CLEAR_HISTORY 40004
@@ -134,14 +135,14 @@
#define IDM_RESUME_INTERRUPTED_PROC 40061
#define IDM_MANAGE_TOKEN_KEYFILES 40062
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
#define _APS_NEXT_RESOURCE_VALUE 120
#define _APS_NEXT_COMMAND_VALUE 40064
-#define _APS_NEXT_CONTROL_VALUE 1146
+#define _APS_NEXT_CONTROL_VALUE 1149
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif