diff options
Diffstat (limited to 'src/Format')
-rw-r--r-- | src/Format/Format.manifest | 8 | ||||
-rw-r--r-- | src/Format/Format.rc | 550 | ||||
-rw-r--r-- | src/Format/Format.vcxproj | 200 | ||||
-rw-r--r-- | src/Format/Format.vcxproj.filters | 66 | ||||
-rw-r--r-- | src/Format/FormatCom.cpp | 93 | ||||
-rw-r--r-- | src/Format/FormatCom.h | 2 | ||||
-rw-r--r-- | src/Format/FormatCom.idl | 6 | ||||
-rw-r--r-- | src/Format/Format_vs2019.vcxproj | 770 | ||||
-rw-r--r-- | src/Format/Format_vs2019.vcxproj.user | 4 | ||||
-rw-r--r-- | src/Format/InPlace.c | 137 | ||||
-rw-r--r-- | src/Format/Resource.h | 3 | ||||
-rw-r--r-- | src/Format/Tcformat.c | 501 | ||||
-rw-r--r-- | src/Format/VeraCrypt_Wizard.bmp | bin | 166518 -> 193446 bytes |
13 files changed, 1862 insertions, 478 deletions
diff --git a/src/Format/Format.manifest b/src/Format/Format.manifest index 5d4cb896..79d86799 100644 --- a/src/Format/Format.manifest +++ b/src/Format/Format.manifest @@ -14,7 +14,13 @@ </asmv3:application> <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> <application> - <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> + <!-- 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> diff --git a/src/Format/Format.rc b/src/Format/Format.rc index a96dcbc2..46e811b7 100644 --- a/src/Format/Format.rc +++ b/src/Format/Format.rc @@ -28,8 +28,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,24,5,0 - PRODUCTVERSION 1,24,5,0 + FILEVERSION 1,26,10,0 + PRODUCTVERSION 1,26,10,0 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -46,11 +46,11 @@ BEGIN BEGIN VALUE "CompanyName", "IDRIX" VALUE "FileDescription", "VeraCrypt Format" - VALUE "FileVersion", "1.24-Beta5" + VALUE "FileVersion", "1.26.10" VALUE "LegalTrademarks", "VeraCrypt" VALUE "OriginalFilename", "VeraCrypt Format.exe" VALUE "ProductName", "VeraCrypt" - VALUE "ProductVersion", "1.24-Beta5" + VALUE "ProductVersion", "1.26.10" END END BLOCK "VarFileInfo" @@ -79,378 +79,378 @@ IDR_FORMAT_TLB TYPELIB "Format.tlb" // Dialog // -IDD_VOL_CREATION_WIZARD_DLG DIALOGEX 0, 0, 400, 229 +IDD_VOL_CREATION_WIZARD_DLG DIALOGEX 0, 0, 450, 250 STYLE DS_SETFONT | DS_SETFOREGROUND | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "VeraCrypt Volume Creation Wizard" CLASS "VeraCryptCustomDlg" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - PUSHBUTTON "&Help",IDHELP,176,209,50,14 - PUSHBUTTON "",IDC_PREV,235,209,50,14 - DEFPUSHBUTTON "",IDC_NEXT,285,209,50,14 - PUSHBUTTON "Cancel",IDCANCEL,343,209,50,14 - LTEXT "",IDC_BOX_TITLE,160,8,233,17 - GROUPBOX "",IDC_STATIC,4,0,392,203 - CONTROL 116,IDC_BITMAP_WIZARD,"Static",SS_BITMAP | SS_SUNKEN,10,9,137,169 - LTEXT "",IDC_POS_BOX,160,24,231,172 + PUSHBUTTON "&Help",IDHELP,166,234,60,14 + PUSHBUTTON "",IDC_PREV,238,234,60,14 + DEFPUSHBUTTON "",IDC_NEXT,310,234,60,14 + PUSHBUTTON "Cancel",IDCANCEL,382,234,60,14 + LTEXT "",IDC_BOX_TITLE,160,8,283,17 + GROUPBOX "",IDC_STATIC,4,0,439,230 + CONTROL 116,IDC_BITMAP_WIZARD,"Static",SS_BITMAP | SS_SUNKEN,10,9,137,193 + LTEXT "",IDC_POS_BOX,160,24,281,193 END -IDD_CIPHER_PAGE_DLG DIALOGEX 0, 0, 226, 172 +IDD_CIPHER_PAGE_DLG DIALOGEX 0, 0, 276, 193 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - COMBOBOX IDC_COMBO_BOX,7,23,137,126,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "&Test",IDC_CIPHER_TEST,149,22,59,14 - PUSHBUTTON "&Benchmark",IDC_BENCHMARK,149,100,59,14 - COMBOBOX IDC_COMBO_BOX_HASH_ALGO,7,137,83,126,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "",IDC_BOX_HELP,7,40,205,58 - GROUPBOX "Encryption Algorithm",IDT_ENCRYPTION_ALGO,0,10,217,111 - GROUPBOX "Hash Algorithm",IDT_HASH_ALGO,0,124,217,35 - LTEXT "More information",IDC_LINK_MORE_INFO_ABOUT_CIPHER,7,102,135,10,SS_NOTIFY - LTEXT "Information on hash algorithms",IDC_LINK_HASH_INFO,97,139,115,8,SS_NOTIFY + COMBOBOX IDC_COMBO_BOX,7,23,172,126,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "&Test",IDC_CIPHER_TEST,191,22,81,14 + PUSHBUTTON "&Benchmark",IDC_BENCHMARK,191,122,81,14 + COMBOBOX IDC_COMBO_BOX_HASH_ALGO,7,169,95,126,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "",IDC_BOX_HELP,7,40,266,78 + GROUPBOX "Encryption Algorithm",IDT_ENCRYPTION_ALGO,0,10,273,131 + GROUPBOX "Hash Algorithm",IDT_HASH_ALGO,0,156,273,35 + LTEXT "More information",IDC_LINK_MORE_INFO_ABOUT_CIPHER,7,124,176,10,SS_NOTIFY + LTEXT "Information on hash algorithms",IDC_LINK_HASH_INFO,121,171,148,8,SS_NOTIFY END -IDD_PASSWORD_PAGE_DLG DIALOGEX 0, 0, 226, 172 +IDD_PASSWORD_PAGE_DLG DIALOGEX 0, 0, 276, 193 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - EDITTEXT IDC_PASSWORD,53,3,170,14,ES_PASSWORD | ES_AUTOHSCROLL - EDITTEXT IDC_VERIFY,53,19,170,14,ES_PASSWORD | ES_AUTOHSCROLL - CONTROL "U&se keyfiles",IDC_KEYFILES_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,53,35,95,10 - PUSHBUTTON "&Keyfiles...",IDC_KEY_FILES,152,36,71,14,WS_DISABLED - CONTROL "&Display password",IDC_SHOW_PASSWORD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,53,45,95,11,WS_EX_TRANSPARENT - CONTROL "Use P&IM",IDC_PIM_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,53,56,97,10 - RTEXT "Password:",IDT_PASSWORD,1,6,50,8 - RTEXT "&Confirm:",IDT_CONFIRM,1,23,50,8 - LTEXT "",IDC_BOX_HELP,0,71,225,97 + EDITTEXT IDC_PASSWORD,71,3,202,14,ES_PASSWORD | ES_AUTOHSCROLL + EDITTEXT IDC_VERIFY,71,19,202,14,ES_PASSWORD | ES_AUTOHSCROLL + CONTROL "U&se keyfiles",IDC_KEYFILES_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,71,35,103,10 + PUSHBUTTON "&Keyfiles...",IDC_KEY_FILES,182,36,91,14,WS_DISABLED + CONTROL "&Display password",IDC_SHOW_PASSWORD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,71,45,108,11,WS_EX_TRANSPARENT + CONTROL "Use P&IM",IDC_PIM_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,71,56,114,10 + RTEXT "Password:",IDT_PASSWORD,1,6,68,8 + RTEXT "&Confirm:",IDT_CONFIRM,1,23,68,8 + LTEXT "",IDC_BOX_HELP,0,71,273,121 END -IDD_SIZE_PAGE_DLG DIALOGEX 0, 0, 226, 172 +IDD_SIZE_PAGE_DLG DIALOGEX 0, 0, 276, 193 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - EDITTEXT IDC_SIZEBOX,0,22,71,14,ES_AUTOHSCROLL | ES_NUMBER - CONTROL "&KB",IDC_KB,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,80,25,27,10 - CONTROL "&MB",IDC_MB,"Button",BS_AUTORADIOBUTTON,115,25,27,10 - CONTROL "&GB",IDC_GB,"Button",BS_AUTORADIOBUTTON,150,25,27,10 - LTEXT "",IDC_BOX_HELP,0,84,214,75 - LTEXT "",IDC_SPACE_LEFT,0,44,214,33 - CONTROL "&TB",IDC_TB,"Button",BS_AUTORADIOBUTTON,185,25,27,10 + EDITTEXT IDC_SIZEBOX,0,22,96,14,ES_AUTOHSCROLL | ES_NUMBER + CONTROL "&KB",IDC_KB,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,105,25,27,10 + CONTROL "&MB",IDC_MB,"Button",BS_AUTORADIOBUTTON,140,25,27,10 + CONTROL "&GB",IDC_GB,"Button",BS_AUTORADIOBUTTON,175,25,27,10 + LTEXT "",IDC_BOX_HELP,0,65,273,123 + LTEXT "",IDC_SPACE_LEFT,0,44,273,18 + CONTROL "&TB",IDC_TB,"Button",BS_AUTORADIOBUTTON,210,25,27,10 END -IDD_VOLUME_LOCATION_PAGE_DLG DIALOGEX 0, 0, 226, 172 +IDD_VOLUME_LOCATION_PAGE_DLG DIALOGEX 0, 0, 276, 193 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - COMBOBOX IDC_COMBO_BOX,0,9,148,80,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP - CONTROL "&Never save history",IDC_NO_HISTORY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,3,28,213,10 - PUSHBUTTON "",IDC_SELECT_VOLUME_LOCATION,155,9,62,14 - LTEXT "",IDC_BOX_HELP,0,42,219,125 + COMBOBOX IDC_COMBO_BOX,0,9,174,80,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP + CONTROL "&Never save history",IDC_NO_HISTORY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,3,28,270,10 + PUSHBUTTON "",IDC_SELECT_VOLUME_LOCATION,181,9,92,14 + LTEXT "",IDC_BOX_HELP,0,45,273,143 END -IDD_FORMAT_PAGE_DLG DIALOGEX 0, 0, 226, 172 +IDD_FORMAT_PAGE_DLG DIALOGEX 0, 0, 276, 193 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - COMBOBOX IDC_FILESYS,43,13,36,90,CBS_DROPDOWNLIST | WS_TABSTOP - COMBOBOX IDC_CLUSTERSIZE,112,13,42,90,CBS_DROPDOWNLIST | WS_TABSTOP - CONTROL "Quick Format",IDC_QUICKFORMAT,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,163,9,60,8 - CONTROL "",IDC_SHOW_KEYS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,214,38,9,8 - PUSHBUTTON "Abort",IDC_ABORT_BUTTON,169,75,50,14 - RTEXT "Header Key: ",IDT_HEADER_KEY,2,47,54,8 - CONTROL "",IDC_HEADER_KEY,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,57,46,163,8,WS_EX_TRANSPARENT - RTEXT "Master Key: ",IDT_MASTER_KEY,2,55,54,8 - LTEXT "",IDC_DISK_KEY,57,54,163,8,0,WS_EX_TRANSPARENT - RTEXT "Cluster ",IDT_CLUSTER,80,15,32,8 - LTEXT "",IDC_BOX_HELP,1,112,224,40 - GROUPBOX "Options",IDT_FORMAT_OPTIONS,0,3,225,29 - CONTROL "",IDC_PROGRESS_BAR,"msctls_progress32",PBS_SMOOTH | WS_BORDER,6,76,158,12 - RTEXT "",IDC_TIMEREMAIN,177,93,42,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE - RTEXT "",IDC_WRITESPEED,106,93,42,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE + COMBOBOX IDC_FILESYS,50,13,36,90,CBS_DROPDOWNLIST | WS_TABSTOP + COMBOBOX IDC_CLUSTERSIZE,135,13,42,90,CBS_DROPDOWNLIST | WS_TABSTOP + COMBOBOX IDC_FORMAT_TYPE,181,8,93,131,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + CONTROL "Dynamic",SPARSE_FILE,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,181,22,92,8 + CONTROL "",IDC_SHOW_KEYS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,265,38,9,8 + PUSHBUTTON "Abort",IDC_ABORT_BUTTON,200,75,64,14 + RTEXT "Header Key: ",IDT_HEADER_KEY,2,47,76,8 + CONTROL "",IDC_HEADER_KEY,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,83,46,190,8,WS_EX_TRANSPARENT + RTEXT "Master Key: ",IDT_MASTER_KEY,2,55,76,8 + LTEXT "",IDC_DISK_KEY,83,54,190,8,0,WS_EX_TRANSPARENT + RTEXT "Cluster ",IDT_CLUSTER,91,15,44,8 + LTEXT "",IDC_BOX_HELP,1,112,274,58 + GROUPBOX "Options",IDT_FORMAT_OPTIONS,0,3,276,29 + CONTROL "",IDC_PROGRESS_BAR,"msctls_progress32",PBS_SMOOTH | WS_BORDER,6,76,189,12 + RTEXT "",IDC_TIMEREMAIN,217,93,46,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE + RTEXT "",IDC_WRITESPEED,128,93,42,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE LTEXT "",IDC_BYTESWRITTEN,29,93,39,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE RTEXT "Done",IDT_DONE,5,94,22,8 - RTEXT "Speed",IDT_SPEED,70,94,34,8 - RTEXT "Left",IDT_LEFT,150,94,25,8 - GROUPBOX "",IDC_STATIC,0,67,225,41 - RTEXT "Filesystem ",IDT_FILESYSTEM,1,15,41,8,0,WS_EX_RIGHT - RTEXT "Random Pool: ",IDT_RANDOM_POOL,2,39,54,8 - GROUPBOX "",IDC_STATIC,0,32,225,35 - CONTROL "",IDC_RANDOM_BYTES,"Static",SS_SIMPLE | WS_GROUP,57,38,155,8,WS_EX_TRANSPARENT - GROUPBOX "Randomness Collected From Mouse Movements",IDT_ENTROPY_BAR,0,153,224,18 - CONTROL "",IDC_ENTROPY_BAR,"msctls_progress32",WS_BORDER,11,162,202,6 - CONTROL "Dynamic",SPARSE_FILE,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,163,21,60,8 -END - -IDD_INTRO_PAGE_DLG DIALOGEX 0, 0, 226, 172 + RTEXT "Speed",IDT_SPEED,81,94,45,8 + RTEXT "Left",IDT_LEFT,177,94,35,8 + GROUPBOX "",IDC_STATIC,0,67,276,41 + RTEXT "Filesystem ",IDT_FILESYSTEM,1,15,46,8,0,WS_EX_RIGHT + RTEXT "Random Pool: ",IDT_RANDOM_POOL,2,39,76,8 + GROUPBOX "",IDC_STATIC,0,32,276,35 + CONTROL "",IDC_RANDOM_BYTES,"Static",SS_SIMPLE | WS_GROUP,83,38,177,8,WS_EX_TRANSPARENT + GROUPBOX "Randomness Collected From Mouse Movements",IDT_ENTROPY_BAR,0,175,276,18 + CONTROL "",IDC_ENTROPY_BAR,"msctls_progress32",WS_BORDER,20,184,235,6 +END + +IDD_INTRO_PAGE_DLG DIALOGEX 0, 0, 276, 193 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN CONTROL "Create an encrypted file container",IDC_FILE_CONTAINER, - "Button",BS_AUTORADIOBUTTON,0,7,217,10 - LTEXT "More information",IDC_MORE_INFO_ON_CONTAINERS,16,40,165,10,SS_NOTIFY + "Button",BS_AUTORADIOBUTTON,0,7,269,10 + LTEXT "More information",IDC_MORE_INFO_ON_CONTAINERS,16,40,253,10,SS_NOTIFY CONTROL "Encrypt a non-system partition/drive",IDC_NONSYS_DEVICE, - "Button",BS_AUTORADIOBUTTON,0,53,217,10 + "Button",BS_AUTORADIOBUTTON,0,55,269,10 CONTROL "Encrypt the system partition or entire system drive",IDC_SYS_DEVICE, - "Button",BS_AUTORADIOBUTTON,0,89,217,10 - LTEXT "More information about system encryption",IDC_MORE_INFO_ON_SYS_ENCRYPTION,16,153,190,10,SS_NOTIFY - LTEXT "Creates a virtual encrypted disk within a file. Recommended for inexperienced users.",IDT_FILE_CONTAINER,16,20,205,16 - LTEXT "Encrypts a non-system partition on any internal or external drive (e.g. a flash drive). Optionally, creates a hidden volume.",IDT_NON_SYS_DEVICE,16,66,205,20 - LTEXT "Encrypts the partition/drive where Windows is installed. Anyone who wants to gain access and use the system, read and write files, etc., will need to enter the correct password each time before Windows boots. Optionally, creates a hidden system.",IDT_SYS_DEVICE,16,102,205,47 + "Button",BS_AUTORADIOBUTTON,0,98,269,10 + LTEXT "More information about system encryption",IDC_MORE_INFO_ON_SYS_ENCRYPTION,16,177,253,10,SS_NOTIFY + LTEXT "Creates a virtual encrypted disk within a file. Recommended for inexperienced users.",IDT_FILE_CONTAINER,16,20,253,16 + LTEXT "Encrypts a non-system partition on any internal or external drive (e.g. a flash drive). Optionally, creates a hidden volume.",IDT_NON_SYS_DEVICE,16,68,253,26 + LTEXT "Encrypts the partition/drive where Windows is installed. Anyone who wants to gain access and use the system, read and write files, etc., will need to enter the correct password each time before Windows boots. Optionally, creates a hidden system.",IDT_SYS_DEVICE,16,112,253,59 END -IDD_INFO_PAGE_DLG DIALOGEX 0, 0, 226, 172 +IDD_INFO_PAGE_DLG DIALOGEX 0, 0, 276, 193 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - LTEXT "",IDC_BOX_HELP,0,10,225,155 + LTEXT "",IDC_BOX_HELP,0,31,269,155 END -IDD_HIDVOL_HOST_FILL_PAGE_DLG DIALOGEX 0, 0, 226, 172 +IDD_HIDVOL_HOST_FILL_PAGE_DLG DIALOGEX 0, 0, 276, 193 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - LTEXT "",IDC_BOX_HELP,0,6,226,138 - PUSHBUTTON "Open Outer Volume",IDC_OPEN_OUTER_VOLUME,0,146,85,14 + LTEXT "",IDC_BOX_HELP,0,6,269,167 + PUSHBUTTON "Open Outer Volume",IDC_OPEN_OUTER_VOLUME,0,176,85,14 END -IDD_HIDDEN_VOL_WIZARD_MODE_PAGE_DLG DIALOGEX 0, 0, 226, 172 +IDD_HIDDEN_VOL_WIZARD_MODE_PAGE_DLG DIALOGEX 0, 0, 276, 193 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - CONTROL "Normal mode",IDC_HIDVOL_WIZ_MODE_FULL,"Button",BS_AUTORADIOBUTTON,0,7,217,10 - CONTROL "Direct mode",IDC_HIDVOL_WIZ_MODE_DIRECT,"Button",BS_AUTORADIOBUTTON,0,87,217,10 - LTEXT "",IDC_BOX_HELP,16,20,205,63 - LTEXT "",IDC_BOX_HELP2,16,101,205,59 + CONTROL "Normal mode",IDC_HIDVOL_WIZ_MODE_FULL,"Button",BS_AUTORADIOBUTTON,0,7,269,10 + CONTROL "Direct mode",IDC_HIDVOL_WIZ_MODE_DIRECT,"Button",BS_AUTORADIOBUTTON,0,97,269,10 + LTEXT "",IDC_BOX_HELP,16,20,253,72 + LTEXT "",IDC_BOX_HELP2,16,110,253,72 END -IDD_PASSWORD_ENTRY_PAGE_DLG DIALOGEX 0, 0, 226, 172 +IDD_PASSWORD_ENTRY_PAGE_DLG DIALOGEX 0, 0, 276, 193 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - EDITTEXT IDC_PASSWORD_DIRECT,50,2,173,14,ES_PASSWORD | ES_AUTOHSCROLL - COMBOBOX IDC_PKCS5_PRF_ID,50,17,104,90,CBS_DROPDOWNLIST | WS_TABSTOP - EDITTEXT IDC_PIM,50,32,42,14,ES_RIGHT | ES_PASSWORD | ES_AUTOHSCROLL | ES_NUMBER | NOT WS_VISIBLE - LTEXT "(Empty or 0 for default iterations)",IDC_PIM_HELP,96,34,127,8,NOT WS_VISIBLE - CONTROL "&Display password",IDC_SHOW_PASSWORD_SINGLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,50,46,84,11,WS_EX_TRANSPARENT - CONTROL "U&se keyfiles",IDC_KEYFILES_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,50,57,94,11 - PUSHBUTTON "&Keyfiles...",IDC_KEY_FILES,149,54,74,14 - LTEXT "",IDC_BOX_HELP,0,74,225,94 - RTEXT "Password:",IDT_PASSWORD,0,6,48,8 - RTEXT "PKCS-5 PRF:",IDT_PKCS5_PRF,0,19,48,8 - RTEXT "Volume PIM:",IDT_PIM,0,35,48,8,NOT WS_VISIBLE - CONTROL "Use P&IM",IDC_PIM_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,50,35,97,10 -END - -IDD_VOLUME_TYPE_PAGE_DLG DIALOGEX 0, 0, 226, 172 + EDITTEXT IDC_PASSWORD_DIRECT,75,2,198,14,ES_PASSWORD | ES_AUTOHSCROLL + COMBOBOX IDC_PKCS5_PRF_ID,75,17,131,90,CBS_DROPDOWNLIST | WS_TABSTOP + EDITTEXT IDC_PIM,75,32,42,14,ES_RIGHT | ES_PASSWORD | ES_AUTOHSCROLL | ES_NUMBER | NOT WS_VISIBLE + LTEXT "(Empty or 0 for default iterations)",IDC_PIM_HELP,121,34,152,8,NOT WS_VISIBLE + CONTROL "&Display password",IDC_SHOW_PASSWORD_SINGLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,75,46,109,11,WS_EX_TRANSPARENT + CONTROL "U&se keyfiles",IDC_KEYFILES_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,75,57,106,11 + PUSHBUTTON "&Keyfiles...",IDC_KEY_FILES,188,54,85,14 + LTEXT "",IDC_BOX_HELP,0,74,273,119 + RTEXT "Password:",IDT_PASSWORD,0,6,71,8 + RTEXT "PKCS-5 PRF:",IDT_PKCS5_PRF,0,19,71,8 + RTEXT "Volume PIM:",IDT_PIM,0,35,71,8,NOT WS_VISIBLE + CONTROL "Use P&IM",IDC_PIM_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,75,35,97,10 +END + +IDD_VOLUME_TYPE_PAGE_DLG DIALOGEX 0, 0, 276, 193 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - CONTROL "Standard VeraCrypt volume",IDC_STD_VOL,"Button",BS_AUTORADIOBUTTON,0,7,212,10 - CONTROL "Hi&dden VeraCrypt volume ",IDC_HIDDEN_VOL,"Button",BS_AUTORADIOBUTTON,0,68,212,10 - LTEXT "More information about hidden volumes",IDC_HIDDEN_VOL_HELP,16,151,205,10,SS_NOTIFY - LTEXT "",IDC_BOX_HELP_NORMAL_VOL,16,20,205,41 - LTEXT "",IDC_BOX_HELP,16,83,205,62 + CONTROL "Standard VeraCrypt volume",IDC_STD_VOL,"Button",BS_AUTORADIOBUTTON,0,7,269,10 + CONTROL "Hi&dden VeraCrypt volume ",IDC_HIDDEN_VOL,"Button",BS_AUTORADIOBUTTON,0,76,269,10 + LTEXT "More information about hidden volumes",IDC_HIDDEN_VOL_HELP,16,173,253,10,SS_NOTIFY + LTEXT "",IDC_BOX_HELP_NORMAL_VOL,16,20,253,52 + LTEXT "",IDC_BOX_HELP,16,93,253,70 END -IDD_SYSENC_SPAN_PAGE_DLG DIALOGEX 0, 0, 226, 172 +IDD_SYSENC_SPAN_PAGE_DLG DIALOGEX 0, 0, 276, 193 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN CONTROL "Encrypt the Windows system partition",IDC_SYS_PARTITION, - "Button",BS_AUTORADIOBUTTON,0,7,212,10 - CONTROL "Encrypt the whole drive",IDC_WHOLE_SYS_DRIVE,"Button",BS_AUTORADIOBUTTON,0,53,212,10 - LTEXT "Select this option to encrypt the partition where the currently running Windows operating system is installed.",IDT_SYS_PARTITION,16,20,205,32 - LTEXT "",IDT_WHOLE_SYS_DRIVE,16,70,205,95 + "Button",BS_AUTORADIOBUTTON,0,7,269,10 + CONTROL "Encrypt the whole drive",IDC_WHOLE_SYS_DRIVE,"Button",BS_AUTORADIOBUTTON,0,67,269,10 + LTEXT "Select this option to encrypt the partition where the currently running Windows operating system is installed.",IDT_SYS_PARTITION,16,20,253,42 + LTEXT "",IDT_WHOLE_SYS_DRIVE,16,82,253,104 END -IDD_SYSENC_RESCUE_DISK_CREATION_DLG DIALOGEX 0, 0, 226, 172 +IDD_SYSENC_RESCUE_DISK_CREATION_DLG DIALOGEX 0, 0, 276, 193 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - EDITTEXT IDC_RESCUE_DISK_ISO_PATH,0,159,163,13,ES_AUTOHSCROLL - PUSHBUTTON "Bro&wse...",IDC_BROWSE,166,158,59,14 - LTEXT "",IDT_RESCUE_DISK_INFO,0,1,225,137 + EDITTEXT IDC_RESCUE_DISK_ISO_PATH,0,180,201,13,ES_AUTOHSCROLL + PUSHBUTTON "Bro&wse...",IDC_BROWSE,204,179,70,14 + LTEXT "",IDT_RESCUE_DISK_INFO,0,1,273,137 CONTROL "Skip Rescue Disk verification",IDC_SKIP_RESCUE_VERIFICATION, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,0,145,106,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,0,166,273,10 END -IDD_SYSENC_COLLECTING_RANDOM_DATA_DLG DIALOGEX 0, 0, 226, 172 +IDD_SYSENC_COLLECTING_RANDOM_DATA_DLG DIALOGEX 0, 0, 276, 193 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - CONTROL "Display pool content",IDC_DISPLAY_POOL_CONTENTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,1,98,122,10 - CONTROL "",IDC_SYS_POOL_CONTENTS,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,8,14,205,72,WS_EX_TRANSPARENT - LTEXT "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 Next to continue.",IDT_COLLECTING_RANDOM_DATA_NOTE,1,112,224,40 - GROUPBOX "Current pool content (partial)",IDT_PARTIAL_POOL_CONTENTS,0,5,222,88 - GROUPBOX "Randomness Collected From Mouse Movements",IDT_ENTROPY_BAR,0,154,224,18 - CONTROL "",IDC_ENTROPY_BAR,"msctls_progress32",WS_BORDER,11,163,202,6 + CONTROL "Display pool content",IDC_DISPLAY_POOL_CONTENTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,93,266,10 + CONTROL "",IDC_SYS_POOL_CONTENTS,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,33,17,209,63,WS_EX_TRANSPARENT + LTEXT "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 Next to continue.",IDT_COLLECTING_RANDOM_DATA_NOTE,10,107,265,63 + GROUPBOX "Current pool content (partial)",IDT_PARTIAL_POOL_CONTENTS,0,5,276,83 + GROUPBOX "Randomness Collected From Mouse Movements",IDT_ENTROPY_BAR,0,174,276,18 + CONTROL "",IDC_ENTROPY_BAR,"msctls_progress32",WS_BORDER,11,183,254,6 END -IDD_SYSENC_MULTI_BOOT_MODE_PAGE_DLG DIALOGEX 0, 0, 226, 172 +IDD_SYSENC_MULTI_BOOT_MODE_PAGE_DLG DIALOGEX 0, 0, 276, 193 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - CONTROL "Single-boot",IDC_SINGLE_BOOT,"Button",BS_AUTORADIOBUTTON,0,7,212,10 - CONTROL "Multi-boot",IDC_MULTI_BOOT,"Button",BS_AUTORADIOBUTTON,0,53,217,10 - LTEXT "Select this option if there is only one operating system installed on this computer (even if it has multiple users).",IDT_SINGLE_BOOT,16,20,205,32 - LTEXT "Select this option if there are two or more operating systems installed on this computer.\n\nFor example:\n- Windows XP and Windows XP\n- Windows XP and Windows Vista\n- Windows and Mac OS X\n- Windows and Linux\n- Windows, Linux and Mac OS X",IDT_MULTI_BOOT,16,66,205,72 + CONTROL "Single-boot",IDC_SINGLE_BOOT,"Button",BS_AUTORADIOBUTTON,0,7,269,10 + CONTROL "Multi-boot",IDC_MULTI_BOOT,"Button",BS_AUTORADIOBUTTON,0,75,217,10 + LTEXT "Select this option if there is only one operating system installed on this computer (even if it has multiple users).",IDT_SINGLE_BOOT,16,20,253,48 + LTEXT "Select this option if there are two or more operating systems installed on this computer.\n\nFor example:\n- Windows XP and Windows XP\n- Windows XP and Windows Vista\n- Windows and Mac OS X\n- Windows and Linux\n- Windows, Linux and Mac OS X",IDT_MULTI_BOOT,16,89,253,90 END -IDD_SYSENC_RESCUE_DISK_BURN_PAGE_DLG DIALOGEX 0, 0, 226, 172 +IDD_SYSENC_RESCUE_DISK_BURN_PAGE_DLG DIALOGEX 0, 0, 276, 193 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Download CD/DVD recording software",IDC_DOWNLOAD_CD_BURN_SOFTWARE,0,136,217,10,SS_NOTIFY - LTEXT "",IDT_RESCUE_DISK_BURN_INFO,0,4,225,128 + LTEXT "Download CD/DVD recording software",IDC_DOWNLOAD_CD_BURN_SOFTWARE,0,159,273,10,SS_NOTIFY + LTEXT "",IDT_RESCUE_DISK_BURN_INFO,0,4,273,148 END -IDD_SYSENC_WIPE_MODE_PAGE_DLG DIALOGEX 0, 0, 226, 172 +IDD_SYSENC_WIPE_MODE_PAGE_DLG DIALOGEX 0, 0, 276, 193 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - COMBOBOX IDC_WIPE_MODE,61,0,127,90,CBS_DROPDOWNLIST | WS_TABSTOP - RTEXT "Wipe mode:",IDT_WIPE_MODE,0,2,59,8,0,WS_EX_RIGHT - LTEXT "",IDT_WIPE_MODE_INFO,0,19,225,128 + COMBOBOX IDC_WIPE_MODE,88,0,138,90,CBS_DROPDOWNLIST | WS_TABSTOP + RTEXT "Wipe mode:",IDT_WIPE_MODE,0,2,83,8,0,WS_EX_RIGHT + LTEXT "",IDT_WIPE_MODE_INFO,0,19,269,167 END -IDD_INPLACE_ENCRYPTION_PAGE_DLG DIALOGEX 0, 0, 226, 172 +IDD_INPLACE_ENCRYPTION_PAGE_DLG DIALOGEX 0, 0, 276, 193 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - COMBOBOX IDC_WIPE_MODE,67,13,125,90,CBS_DROPDOWNLIST | WS_TABSTOP - PUSHBUTTON "&Pause",IDC_PAUSE,169,40,50,14 - LTEXT "More information",IDC_MORE_INFO_SYS_ENCRYPTION,1,150,202,10,SS_NOTIFY + COMBOBOX IDC_WIPE_MODE,96,13,125,90,CBS_DROPDOWNLIST | WS_TABSTOP + PUSHBUTTON "&Pause",IDC_PAUSE,204,40,63,14 + LTEXT "More information",IDC_MORE_INFO_SYS_ENCRYPTION,1,176,266,10,SS_NOTIFY LTEXT "",IDC_BYTESWRITTEN,29,58,39,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE - RTEXT "",IDC_WRITESPEED,103,58,46,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE - RTEXT "",IDC_TIMEREMAIN,177,58,42,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE - RTEXT "Wipe mode:",IDT_WIPE_MODE,6,15,59,8,0,WS_EX_RIGHT - CONTROL "",IDC_PROGRESS_BAR,"msctls_progress32",PBS_SMOOTH | WS_BORDER,6,41,158,12 + RTEXT "",IDC_WRITESPEED,110,58,56,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE + RTEXT "",IDC_TIMEREMAIN,212,58,54,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE + RTEXT "Wipe mode:",IDT_WIPE_MODE,6,15,85,8,0,WS_EX_RIGHT + CONTROL "",IDC_PROGRESS_BAR,"msctls_progress32",PBS_SMOOTH | WS_BORDER,6,41,192,12 RTEXT "Done",IDT_DONE,5,59,22,8 - RTEXT "Status",IDT_STATUS,72,59,29,8 - RTEXT "Left",IDT_LEFT,151,59,24,8 - LTEXT "",IDC_BOX_HELP,1,77,224,70 - GROUPBOX "Options",IDT_FORMAT_OPTIONS,0,3,225,29 - GROUPBOX "",IDC_STATIC,0,32,225,41 + RTEXT "Status",IDT_STATUS,73,59,33,8 + RTEXT "Left",IDT_LEFT,172,59,35,8 + LTEXT "",IDC_BOX_HELP,1,77,266,95 + GROUPBOX "Options",IDT_FORMAT_OPTIONS,0,3,267,29 + GROUPBOX "",IDC_STATIC,0,32,267,41 END -IDD_SYSENC_KEYS_GEN_PAGE_DLG DIALOGEX 0, 0, 226, 172 +IDD_SYSENC_KEYS_GEN_PAGE_DLG DIALOGEX 0, 0, 276, 193 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN CONTROL "Display generated keys (their portions)",IDC_DISPLAY_KEYS, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,1,94,216,10 - CONTROL "",IDC_HEADER_KEY,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,57,71,163,8,WS_EX_TRANSPARENT - LTEXT "",IDC_DISK_KEY,57,79,163,8,0,WS_EX_TRANSPARENT - LTEXT "The keys, salt, and other data have been successfully generated. If you want to generate new keys, click Back and then Next. Otherwise, click Next to continue.",IDT_SYSENC_KEYS_GEN_INFO,1,23,224,41 - RTEXT "Header Key: ",IDT_HEADER_KEY,2,72,54,8 - RTEXT "Master Key: ",IDT_MASTER_KEY,2,80,54,8 - GROUPBOX "",-1,0,65,225,26 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,51,110,216,10 + CONTROL "",IDC_HEADER_KEY,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,100,87,163,8,WS_EX_TRANSPARENT + LTEXT "",IDC_DISK_KEY,100,95,163,8,0,WS_EX_TRANSPARENT + LTEXT "The keys, salt, and other data have been successfully generated. If you want to generate new keys, click Back and then Next. Otherwise, click Next to continue.",IDT_SYSENC_KEYS_GEN_INFO,1,23,266,57 + RTEXT "Header Key: ",IDT_HEADER_KEY,2,88,93,8 + RTEXT "Master Key: ",IDT_MASTER_KEY,2,96,93,8 + GROUPBOX "",-1,0,81,267,26 END -IDD_UNIVERSAL_DUAL_CHOICE_PAGE_DLG DIALOGEX 0, 0, 226, 172 +IDD_UNIVERSAL_DUAL_CHOICE_PAGE_DLG DIALOGEX 0, 0, 276, 193 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - CONTROL "",IDC_CHOICE1,"Button",BS_AUTORADIOBUTTON,0,7,212,10 - CONTROL "",IDC_CHOICE2,"Button",BS_AUTORADIOBUTTON,0,17,217,10 - LTEXT "",IDC_BOX_HELP,1,34,220,112 + CONTROL "",IDC_CHOICE1,"Button",BS_AUTORADIOBUTTON,0,7,269,10 + CONTROL "",IDC_CHOICE2,"Button",BS_AUTORADIOBUTTON,0,17,269,10 + LTEXT "",IDC_BOX_HELP,1,34,268,152 END -IDD_SYSENC_DRIVE_ANALYSIS_PAGE_DLG DIALOGEX 0, 0, 226, 172 +IDD_SYSENC_DRIVE_ANALYSIS_PAGE_DLG DIALOGEX 0, 0, 276, 193 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "",IDT_SYSENC_DRIVE_ANALYSIS_INFO,2,10,215,88 - CONTROL "",IDC_PROGRESS_BAR,"msctls_progress32",PBS_SMOOTH | WS_BORDER,1,115,216,12 - LTEXT "Progress:",IDT_PROGRESS,2,104,57,8 + LTEXT "",IDT_SYSENC_DRIVE_ANALYSIS_INFO,0,10,267,109 + CONTROL "",IDC_PROGRESS_BAR,"msctls_progress32",PBS_SMOOTH | WS_BORDER,0,135,267,12 + LTEXT "Progress:",IDT_PROGRESS,2,124,172,8 END -IDD_SYSENC_TYPE_PAGE_DLG DIALOGEX 0, 0, 226, 172 +IDD_SYSENC_TYPE_PAGE_DLG DIALOGEX 0, 0, 276, 193 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - CONTROL "Normal",IDC_SYSENC_NORMAL,"Button",BS_AUTORADIOBUTTON,0,7,212,10 - CONTROL "Hi&dden",IDC_SYSENC_HIDDEN,"Button",BS_AUTORADIOBUTTON,0,53,212,10 - LTEXT "More information",IDC_HIDDEN_SYSENC_INFO_LINK,16,148,205,10,SS_NOTIFY - LTEXT "",IDC_BOX_HELP_SYSENC_NORMAL,16,20,205,25 - LTEXT "",IDC_BOX_HELP,16,67,205,72 + CONTROL "Normal",IDC_SYSENC_NORMAL,"Button",BS_AUTORADIOBUTTON,0,7,269,10 + CONTROL "Hi&dden",IDC_SYSENC_HIDDEN,"Button",BS_AUTORADIOBUTTON,0,64,269,10 + LTEXT "More information",IDC_HIDDEN_SYSENC_INFO_LINK,16,173,253,10,SS_NOTIFY + LTEXT "",IDC_BOX_HELP_SYSENC_NORMAL,16,20,253,41 + LTEXT "",IDC_BOX_HELP,16,78,253,90 END -IDD_SYSENC_HIDDEN_OS_REQ_CHECK_PAGE_DLG DIALOGEX 0, 0, 226, 172 +IDD_SYSENC_HIDDEN_OS_REQ_CHECK_PAGE_DLG DIALOGEX 0, 0, 276, 193 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "More information",IDC_HIDDEN_SYSENC_INFO_LINK,0,150,217,10,SS_NOTIFY - LTEXT "",IDC_BOX_HELP,0,2,225,142 + LTEXT "More information",IDC_HIDDEN_SYSENC_INFO_LINK,0,172,273,10,SS_NOTIFY + LTEXT "",IDC_BOX_HELP,0,2,273,166 END -IDD_DEVICE_WIPE_PAGE_DLG DIALOGEX 0, 0, 226, 172 +IDD_DEVICE_WIPE_PAGE_DLG DIALOGEX 0, 0, 276, 193 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - PUSHBUTTON "Abort",IDC_ABORT_BUTTON,169,48,50,14 + PUSHBUTTON "Abort",IDC_ABORT_BUTTON,217,48,50,14 LTEXT "",IDC_BYTESWRITTEN,29,66,39,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE - RTEXT "",IDC_WRITESPEED,103,66,46,11,SS_CENTERIMAGE | NOT WS_VISIBLE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE - RTEXT "",IDC_TIMEREMAIN,177,66,42,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE - RTEXT "Wipe mode:",IDT_WIPE_MODE,6,22,59,8,0,WS_EX_RIGHT - CONTROL "",IDC_PROGRESS_BAR,"msctls_progress32",PBS_SMOOTH | WS_BORDER,6,49,158,12 + RTEXT "",IDC_WRITESPEED,119,66,46,11,SS_CENTERIMAGE | NOT WS_VISIBLE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE + RTEXT "",IDC_TIMEREMAIN,219,66,48,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE + RTEXT "Wipe mode:",IDT_WIPE_MODE,6,22,92,8,0,WS_EX_RIGHT + CONTROL "",IDC_PROGRESS_BAR,"msctls_progress32",PBS_SMOOTH | WS_BORDER,6,49,208,12 RTEXT "Done",IDT_DONE,5,67,22,8 - RTEXT "Pass",IDT_PASS,72,67,29,8,NOT WS_VISIBLE - RTEXT "Left",IDT_LEFT,151,67,24,8 - LTEXT "",IDC_BOX_HELP,1,86,224,80 - GROUPBOX "",IDT_FORMAT_OPTIONS,0,10,225,29 - GROUPBOX "",IDC_STATIC,0,40,225,42 - LTEXT "",IDC_WIPE_MODE,67,21,125,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_STATICEDGE + RTEXT "Pass",IDT_PASS,73,67,44,8,NOT WS_VISIBLE + RTEXT "Left",IDT_LEFT,180,67,34,8 + LTEXT "",IDC_BOX_HELP,1,96,266,91 + GROUPBOX "",IDT_FORMAT_OPTIONS,0,10,267,29 + GROUPBOX "",IDC_STATIC,0,40,267,42 + LTEXT "",IDC_WIPE_MODE,101,21,125,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_STATICEDGE END -IDD_DEVICE_WIPE_MODE_PAGE_DLG DIALOGEX 0, 0, 226, 172 +IDD_DEVICE_WIPE_MODE_PAGE_DLG DIALOGEX 0, 0, 276, 193 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - COMBOBOX IDC_WIPE_MODE,61,9,127,90,CBS_DROPDOWNLIST | WS_TABSTOP - RTEXT "Wipe mode:",IDT_WIPE_MODE,0,11,59,8,0,WS_EX_RIGHT - LTEXT "",IDT_WIPE_MODE_INFO,0,29,225,122 + COMBOBOX IDC_WIPE_MODE,89,9,127,90,CBS_DROPDOWNLIST | WS_TABSTOP + RTEXT "Wipe mode:",IDT_WIPE_MODE,0,11,86,8,0,WS_EX_RIGHT + LTEXT "",IDT_WIPE_MODE_INFO,0,29,269,157 END -IDD_DEVICE_TRANSFORM_MODE_DLG DIALOGEX 0, 0, 226, 172 +IDD_DEVICE_TRANSFORM_MODE_DLG DIALOGEX 0, 0, 276, 193 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN CONTROL "Create encrypted volume and format it",IDC_DEVICE_TRANSFORM_MODE_FORMAT, - "Button",BS_AUTORADIOBUTTON,0,8,217,10 + "Button",BS_AUTORADIOBUTTON,0,8,269,10 CONTROL "Encrypt partition in place",IDC_DEVICE_TRANSFORM_MODE_INPLACE, - "Button",BS_AUTORADIOBUTTON,0,98,217,10 - LTEXT "",IDC_BOX_HELP,16,21,205,74 - LTEXT "",IDC_BOX_HELP2,16,112,205,53 + "Button",BS_AUTORADIOBUTTON,0,111,269,10 + LTEXT "",IDC_BOX_HELP,16,21,253,84 + LTEXT "",IDC_BOX_HELP2,16,125,253,61 END -IDD_EXPANDED_LIST_SELECT_PAGE_DLG DIALOGEX 0, 0, 226, 172 +IDD_EXPANDED_LIST_SELECT_PAGE_DLG DIALOGEX 0, 0, 276, 193 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - LTEXT "",IDC_BOX_HELP,0,107,225,58 - LISTBOX IDC_LIST_BOX,0,3,222,100,LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_VSCROLL + LTEXT "",IDC_BOX_HELP,0,117,269,69 + LISTBOX IDC_LIST_BOX,0,3,269,107,LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_VSCROLL END -IDD_DRIVE_LETTER_SELECTION_PAGE DIALOGEX 0, 0, 226, 172 +IDD_DRIVE_LETTER_SELECTION_PAGE DIALOGEX 0, 0, 277, 193 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - LTEXT "",IDC_BOX_HELP,0,40,225,118 - COMBOBOX IDC_DRIVE_LETTER_LIST,94,15,38,69,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - RTEXT "Drive letter:",IDT_DRIVE_LETTER,5,17,86,8 + LTEXT "",IDC_BOX_HELP,0,40,270,146 + COMBOBOX IDC_DRIVE_LETTER_LIST,115,15,38,69,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + RTEXT "Drive letter:",IDT_DRIVE_LETTER,5,17,106,8 END -IDD_PIM_PAGE_DLG DIALOGEX 0, 0, 226, 172 +IDD_PIM_PAGE_DLG DIALOGEX 0, 0, 276, 193 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - EDITTEXT IDC_PIM,53,0,42,14,ES_RIGHT | ES_PASSWORD | ES_AUTOHSCROLL | ES_NUMBER - LTEXT "",IDC_BOX_HELP,0,32,225,126 - RTEXT "Volume PIM:",IDT_PIM,1,3,50,8 - LTEXT "(Empty or 0 for default iterations)",IDC_PIM_HELP,97,3,126,8 - LTEXT "Information on PIM",IDC_LINK_PIM_INFO,0,161,213,8,SS_NOTIFY - CONTROL "Display PIM",IDC_SHOW_PIM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,53,17,150,10 + EDITTEXT IDC_PIM,74,0,42,14,ES_RIGHT | ES_PASSWORD | ES_AUTOHSCROLL | ES_NUMBER + LTEXT "",IDC_BOX_HELP,0,32,273,142 + RTEXT "Volume PIM:",IDT_PIM,1,3,69,8 + LTEXT "(Empty or 0 for default iterations)",IDC_PIM_HELP,120,3,153,8 + LTEXT "Information on PIM",IDC_LINK_PIM_INFO,0,179,273,8,SS_NOTIFY + CONTROL "Display PIM",IDC_SHOW_PIM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,74,17,196,10 END @@ -491,40 +491,38 @@ GUIDELINES DESIGNINFO BEGIN IDD_VOL_CREATION_WIZARD_DLG, DIALOG BEGIN - RIGHTMARGIN, 393 + RIGHTMARGIN, 443 TOPMARGIN, 1 - BOTTOMMARGIN, 227 - HORZGUIDE, 216 + BOTTOMMARGIN, 248 + HORZGUIDE, 241 END IDD_CIPHER_PAGE_DLG, DIALOG BEGIN - RIGHTMARGIN, 223 - BOTTOMMARGIN, 161 + RIGHTMARGIN, 273 + BOTTOMMARGIN, 182 END IDD_PASSWORD_PAGE_DLG, DIALOG BEGIN - RIGHTMARGIN, 223 - BOTTOMMARGIN, 143 + RIGHTMARGIN, 273 + BOTTOMMARGIN, 192 END IDD_SIZE_PAGE_DLG, DIALOG BEGIN - RIGHTMARGIN, 223 - BOTTOMMARGIN, 165 + RIGHTMARGIN, 273 + BOTTOMMARGIN, 186 END IDD_VOLUME_LOCATION_PAGE_DLG, DIALOG BEGIN - RIGHTMARGIN, 223 - BOTTOMMARGIN, 167 + RIGHTMARGIN, 273 + BOTTOMMARGIN, 188 END IDD_FORMAT_PAGE_DLG, DIALOG BEGIN - RIGHTMARGIN, 217 - BOTTOMMARGIN, 153 HORZGUIDE, 80 HORZGUIDE, 96 END @@ -532,67 +530,65 @@ BEGIN IDD_INTRO_PAGE_DLG, DIALOG BEGIN LEFTMARGIN, 7 - RIGHTMARGIN, 219 + RIGHTMARGIN, 269 TOPMARGIN, 7 - BOTTOMMARGIN, 165 + BOTTOMMARGIN, 186 END IDD_INFO_PAGE_DLG, DIALOG BEGIN LEFTMARGIN, 7 - RIGHTMARGIN, 219 + RIGHTMARGIN, 269 TOPMARGIN, 7 - BOTTOMMARGIN, 165 + BOTTOMMARGIN, 186 END IDD_HIDVOL_HOST_FILL_PAGE_DLG, DIALOG BEGIN LEFTMARGIN, 7 - RIGHTMARGIN, 219 + RIGHTMARGIN, 269 TOPMARGIN, 7 - BOTTOMMARGIN, 165 + BOTTOMMARGIN, 186 END IDD_HIDDEN_VOL_WIZARD_MODE_PAGE_DLG, DIALOG BEGIN LEFTMARGIN, 7 - RIGHTMARGIN, 219 + RIGHTMARGIN, 269 TOPMARGIN, 7 - BOTTOMMARGIN, 165 + BOTTOMMARGIN, 186 END IDD_PASSWORD_ENTRY_PAGE_DLG, DIALOG BEGIN - RIGHTMARGIN, 223 - BOTTOMMARGIN, 143 + RIGHTMARGIN, 273 END IDD_VOLUME_TYPE_PAGE_DLG, DIALOG BEGIN LEFTMARGIN, 7 - RIGHTMARGIN, 219 + RIGHTMARGIN, 269 TOPMARGIN, 7 - BOTTOMMARGIN, 165 + BOTTOMMARGIN, 186 END IDD_SYSENC_SPAN_PAGE_DLG, DIALOG BEGIN LEFTMARGIN, 7 - RIGHTMARGIN, 219 + RIGHTMARGIN, 269 TOPMARGIN, 7 - BOTTOMMARGIN, 165 + BOTTOMMARGIN, 186 END IDD_SYSENC_RESCUE_DISK_CREATION_DLG, DIALOG BEGIN - RIGHTMARGIN, 223 - BOTTOMMARGIN, 167 + RIGHTMARGIN, 273 + BOTTOMMARGIN, 188 END IDD_SYSENC_COLLECTING_RANDOM_DATA_DLG, DIALOG BEGIN - RIGHTMARGIN, 217 - BOTTOMMARGIN, 153 + BOTTOMMARGIN, 174 HORZGUIDE, 80 HORZGUIDE, 96 END @@ -600,37 +596,37 @@ BEGIN IDD_SYSENC_MULTI_BOOT_MODE_PAGE_DLG, DIALOG BEGIN LEFTMARGIN, 7 - RIGHTMARGIN, 219 + RIGHTMARGIN, 269 TOPMARGIN, 7 - BOTTOMMARGIN, 165 + BOTTOMMARGIN, 186 END IDD_SYSENC_RESCUE_DISK_BURN_PAGE_DLG, DIALOG BEGIN - RIGHTMARGIN, 223 - BOTTOMMARGIN, 167 + RIGHTMARGIN, 273 + BOTTOMMARGIN, 188 END IDD_SYSENC_WIPE_MODE_PAGE_DLG, DIALOG BEGIN LEFTMARGIN, 7 - RIGHTMARGIN, 219 + RIGHTMARGIN, 269 TOPMARGIN, 7 - BOTTOMMARGIN, 165 + BOTTOMMARGIN, 186 END IDD_INPLACE_ENCRYPTION_PAGE_DLG, DIALOG BEGIN - RIGHTMARGIN, 217 - BOTTOMMARGIN, 166 + RIGHTMARGIN, 267 + BOTTOMMARGIN, 187 HORZGUIDE, 80 HORZGUIDE, 96 END IDD_SYSENC_KEYS_GEN_PAGE_DLG, DIALOG BEGIN - RIGHTMARGIN, 217 - BOTTOMMARGIN, 153 + RIGHTMARGIN, 267 + BOTTOMMARGIN, 174 HORZGUIDE, 80 HORZGUIDE, 96 END @@ -638,15 +634,15 @@ BEGIN IDD_UNIVERSAL_DUAL_CHOICE_PAGE_DLG, DIALOG BEGIN LEFTMARGIN, 7 - RIGHTMARGIN, 219 + RIGHTMARGIN, 269 TOPMARGIN, 7 - BOTTOMMARGIN, 165 + BOTTOMMARGIN, 186 END IDD_SYSENC_DRIVE_ANALYSIS_PAGE_DLG, DIALOG BEGIN - RIGHTMARGIN, 217 - BOTTOMMARGIN, 153 + RIGHTMARGIN, 267 + BOTTOMMARGIN, 174 HORZGUIDE, 80 HORZGUIDE, 96 END @@ -654,21 +650,21 @@ BEGIN IDD_SYSENC_TYPE_PAGE_DLG, DIALOG BEGIN LEFTMARGIN, 7 - RIGHTMARGIN, 219 + RIGHTMARGIN, 269 TOPMARGIN, 7 - BOTTOMMARGIN, 165 + BOTTOMMARGIN, 186 END IDD_SYSENC_HIDDEN_OS_REQ_CHECK_PAGE_DLG, DIALOG BEGIN - RIGHTMARGIN, 223 - BOTTOMMARGIN, 167 + RIGHTMARGIN, 273 + BOTTOMMARGIN, 188 END IDD_DEVICE_WIPE_PAGE_DLG, DIALOG BEGIN - RIGHTMARGIN, 217 - BOTTOMMARGIN, 166 + RIGHTMARGIN, 267 + BOTTOMMARGIN, 187 HORZGUIDE, 80 HORZGUIDE, 96 END @@ -676,39 +672,39 @@ BEGIN IDD_DEVICE_WIPE_MODE_PAGE_DLG, DIALOG BEGIN LEFTMARGIN, 7 - RIGHTMARGIN, 219 + RIGHTMARGIN, 269 TOPMARGIN, 7 - BOTTOMMARGIN, 165 + BOTTOMMARGIN, 186 END IDD_DEVICE_TRANSFORM_MODE_DLG, DIALOG BEGIN LEFTMARGIN, 7 - RIGHTMARGIN, 219 + RIGHTMARGIN, 269 TOPMARGIN, 7 - BOTTOMMARGIN, 165 + BOTTOMMARGIN, 186 END IDD_EXPANDED_LIST_SELECT_PAGE_DLG, DIALOG BEGIN LEFTMARGIN, 7 - RIGHTMARGIN, 219 + RIGHTMARGIN, 269 TOPMARGIN, 7 - BOTTOMMARGIN, 165 + BOTTOMMARGIN, 186 END IDD_DRIVE_LETTER_SELECTION_PAGE, DIALOG BEGIN LEFTMARGIN, 7 - RIGHTMARGIN, 219 + RIGHTMARGIN, 270 TOPMARGIN, 7 - BOTTOMMARGIN, 165 + BOTTOMMARGIN, 186 END IDD_PIM_PAGE_DLG, DIALOG BEGIN - RIGHTMARGIN, 223 - BOTTOMMARGIN, 171 + RIGHTMARGIN, 273 + BOTTOMMARGIN, 192 END END #endif // APSTUDIO_INVOKED diff --git a/src/Format/Format.vcxproj b/src/Format/Format.vcxproj index 204654e1..1ae26d43 100644 --- a/src/Format/Format.vcxproj +++ b/src/Format/Format.vcxproj @@ -17,6 +17,14 @@ <Configuration>ReleaseCustomEFI</Configuration> <Platform>x64</Platform> </ProjectConfiguration> + <ProjectConfiguration Include="Release_SkipOsDriverReqCheck|Win32"> + <Configuration>Release_SkipOsDriverReqCheck</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release_SkipOsDriverReqCheck|x64"> + <Configuration>Release_SkipOsDriverReqCheck</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> <ProjectConfiguration Include="Release|Win32"> <Configuration>Release</Configuration> <Platform>Win32</Platform> @@ -37,6 +45,11 @@ <CharacterSet>Unicode</CharacterSet> <PlatformToolset>Windows7.1SDK</PlatformToolset> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <PlatformToolset>Windows7.1SDK</PlatformToolset> + </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <CharacterSet>Unicode</CharacterSet> @@ -52,6 +65,11 @@ <CharacterSet>Unicode</CharacterSet> <PlatformToolset>Windows7.1SDK</PlatformToolset> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <PlatformToolset>Windows7.1SDK</PlatformToolset> + </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <CharacterSet>Unicode</CharacterSet> @@ -69,6 +87,10 @@ <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_SkipOsDriverReqCheck|Win32'" 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|Win32'" 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" /> @@ -81,6 +103,10 @@ <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_SkipOsDriverReqCheck|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|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" /> @@ -101,26 +127,36 @@ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</GenerateManifest> <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">Release\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">Release\</OutDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">Release\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">Release\</IntDir> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">false</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">false</LinkIncremental> <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateManifest> + <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">true</GenerateManifest> <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</GenerateManifest> <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">$(Platform)\$(Configuration)\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(Platform)\$(Configuration)\</OutDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">$(Platform)\$(Configuration)\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(Platform)\$(Configuration)\</IntDir> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">false</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">false</LinkIncremental> <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</GenerateManifest> + <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">true</GenerateManifest> <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">true</GenerateManifest> <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">VeraCryptFormat</TargetName> <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">VeraCryptFormat</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">VeraCryptFormat</TargetName> <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">VeraCryptFormat</TargetName> <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">VeraCryptFormat</TargetName> <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">VeraCryptFormat</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">VeraCryptFormat</TargetName> <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">VeraCryptFormat</TargetName> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> @@ -129,7 +165,7 @@ </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>VOLFORMAT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>true</MinimalRebuild> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> @@ -142,10 +178,10 @@ <DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> </ClCompile> <Link> - <AdditionalDependencies>..\Crypto\Debug\crypto.lib;..\Common\Debug\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>..\Crypto\Debug\crypto.lib;..\Common\Debug\Zip.lib;..\Common\Debug\lzma.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <GenerateDebugInformation>true</GenerateDebugInformation> <ProgramDatabaseFile>$(OutDir)Format.pdb</ProgramDatabaseFile> <SubSystem>Windows</SubSystem> @@ -169,7 +205,7 @@ copy Debug\VeraCryptFormat.exe "..\Debug\Setup Files\VeraCrypt Format.exe" >N </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>VOLFORMAT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>true</MinimalRebuild> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> @@ -182,10 +218,10 @@ copy Debug\VeraCryptFormat.exe "..\Debug\Setup Files\VeraCrypt Format.exe" >N <DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> </ClCompile> <Link> - <AdditionalDependencies>..\Crypto\x64\Debug\crypto.lib;..\Common\x64\Debug\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>..\Crypto\x64\Debug\crypto.lib;..\Common\x64\Debug\Zip.lib;..\Common\x64\Debug\lzma.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <GenerateDebugInformation>true</GenerateDebugInformation> <ProgramDatabaseFile>$(OutDir)Format.pdb</ProgramDatabaseFile> <SubSystem>Windows</SubSystem> @@ -212,7 +248,7 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" >NUL: <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>VOLFORMAT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <BufferSecurityCheck>true</BufferSecurityCheck> @@ -225,10 +261,50 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" >NUL: <DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> </ClCompile> <Link> - <AdditionalDependencies>..\Crypto\Release\crypto.lib;..\Common\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>..\Crypto\Release\crypto.lib;..\Common\Release\Zip.lib;..\Common\Release\lzma.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.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>MachineX86</TargetMachine> + </Link> + <Manifest> + <AdditionalManifestFiles>Format.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> + </Manifest> + <PostBuildEvent> + <Command>copy Release\VeraCryptFormat.exe "..\Release\Setup Files\VeraCrypt Format.exe"</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'"> + <Midl> + <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> + </Midl> + <ClCompile> + <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> + <Optimization>MaxSpeed</Optimization> + <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>VOLFORMAT;VC_SKIP_OS_DRIVER_REQ_CHECK;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>Level4</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + <Link> + <AdditionalDependencies>..\Crypto\Release\crypto.lib;..\Common\Release\Zip.lib;..\Common\Release\lzma.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.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> @@ -252,7 +328,7 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" >NUL: <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>VOLFORMAT;VC_EFI_CUSTOM_MODE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <BufferSecurityCheck>true</BufferSecurityCheck> @@ -265,10 +341,10 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" >NUL: <DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> </ClCompile> <Link> - <AdditionalDependencies>..\Crypto\Release\crypto.lib;..\Common\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>..\Crypto\Release\crypto.lib;..\Common\Release\Zip.lib;..\Common\Release\lzma.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.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> @@ -296,7 +372,7 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" >NUL: <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>VOLFORMAT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <BufferSecurityCheck>true</BufferSecurityCheck> @@ -309,10 +385,54 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" >NUL: <DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> </ClCompile> <Link> - <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;..\Common\x64\Release\lzma.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.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> + </Link> + <Manifest> + <AdditionalManifestFiles>Format.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> + </Manifest> + <PostBuildEvent> + <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt Format-x64.exe"</Command> + </PostBuildEvent> + <ResourceCompile> + <PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ResourceCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'"> + <Midl> + <TargetEnvironment>X64</TargetEnvironment> + <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> + </Midl> + <ClCompile> + <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> + <Optimization>MaxSpeed</Optimization> + <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>VOLFORMAT;VC_SKIP_OS_DRIVER_REQ_CHECK;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>Level4</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + <Link> + <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;..\Common\x64\Release\lzma.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.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> @@ -340,7 +460,7 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" >NUL: <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>VOLFORMAT;VC_EFI_CUSTOM_MODE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <BufferSecurityCheck>true</BufferSecurityCheck> @@ -353,10 +473,10 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" >NUL: <DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> </ClCompile> <Link> - <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;..\Common\x64\Release\lzma.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> - <DelayLoadDLLs>mpr.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.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> @@ -377,21 +497,36 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" >NUL: </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="FormatCom.cpp" /> <ClCompile Include="InPlace.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)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs> </ClCompile> <ClCompile Include="Tcformat.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)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs> </ClCompile> <ClCompile Include="..\Common\BaseCom.cpp" /> @@ -404,16 +539,20 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" >NUL: <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)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">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)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs> </ClCompile> <ClCompile Include="..\Common\EncryptionThreadPool.c" /> @@ -425,8 +564,10 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" >NUL: <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)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">CompileAsCpp</CompileAs> <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs> </ClCompile> <ClCompile Include="..\Common\Language.c" /> @@ -447,16 +588,27 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" >NUL: </ItemGroup> <ItemGroup> <ClInclude Include="..\Common\BaseCom.h" /> + <ClInclude Include="..\Common\CommandAPDU.h" /> <ClInclude Include="..\Common\Common.h" /> <ClInclude Include="..\Common\Crc.h" /> <ClInclude Include="..\Common\Crypto.h" /> <ClInclude Include="..\Common\Dictionary.h" /> <ClInclude Include="..\Common\Dlgcode.h" /> + <ClInclude Include="..\Common\EMVCard.h" /> + <ClInclude Include="..\Common\EMVToken.h" /> <ClInclude Include="..\Common\EncryptionThreadPool.h" /> <ClInclude Include="..\Common\Endian.h" /> <ClInclude Include="..\Common\Exception.h" /> <ClInclude Include="..\Common\Fat.h" /> <ClInclude Include="..\Common\Format.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="FormatCom.h" /> <ClInclude Include="..\Common\GfMul.h" /> <ClInclude Include="InPlace.h" /> @@ -514,7 +666,9 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" >NUL: <None Include="..\Boot\Windows\Release_Twofish\BootSector.bin" /> <None Include="..\Boot\Windows\Release_AES\BootSector.bin" /> <None Include="..\Boot\Windows\Release\Decompressor.com" /> - <None Include="..\Common\Language.xml" /> + <None Include="..\Common\Language.xml"> + <SubType>Designer</SubType> + </None> <None Include="..\Resources\Texts\License.rtf" /> <None Include="..\Common\Textual_logo_288dpi.bmp" /> <None Include="..\Common\Textual_logo_96dpi.bmp" /> @@ -530,8 +684,10 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" >NUL: <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)'=='Release_SkipOsDriverReqCheck|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">true</ExcludedFromBuild> </ResourceCompile> </ItemGroup> @@ -540,6 +696,12 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" >NUL: <Project>{8b7f059f-e4c7-4e11-88f5-ee8b8433072e}</Project> <ReferenceOutputAssembly>false</ReferenceOutputAssembly> </ProjectReference> + <ProjectReference Include="..\Common\Lzma.vcxproj"> + <Project>{b896fe1f-6bf3-4f75-9148-f841829073d9}</Project> + </ProjectReference> + <ProjectReference Include="..\Common\Zip.vcxproj"> + <Project>{6316ee71-0210-4ca4-bcc7-cfb7a3c090fc}</Project> + </ProjectReference> <ProjectReference Include="..\Crypto\Crypto.vcxproj"> <Project>{993245cf-6b70-47ee-91bb-39f8fc6dc0e7}</Project> <ReferenceOutputAssembly>false</ReferenceOutputAssembly> diff --git a/src/Format/Format.vcxproj.filters b/src/Format/Format.vcxproj.filters index 4f0e81eb..dbba0b57 100644 --- a/src/Format/Format.vcxproj.filters +++ b/src/Format/Format.vcxproj.filters @@ -108,6 +108,39 @@ <ClCompile Include="..\Common\Xts.c"> <Filter>Source Files\Common</Filter> </ClCompile> + <ClCompile Include="..\Common\EMVToken.cpp"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\Common\Token.cpp"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\Common\TLVParser.cpp"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\Common\CommandAPDU.cpp"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\Common\PCSCException.cpp"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\Common\ResponseAPDU.cpp"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\Common\SCardLoader.cpp"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\Common\SCardManager.cpp"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\Common\SCardReader.cpp"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\Common\EMVCard.cpp"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\Common\SCard.cpp"> + <Filter>Source Files\Common</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <Midl Include="FormatCom.idl"> @@ -208,6 +241,39 @@ <ClInclude Include="..\Common\Xts.h"> <Filter>Header Files</Filter> </ClInclude> + <ClInclude Include="..\Common\EMVToken.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\Token.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\TLVParser.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\CommandAPDU.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\PCSCException.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\ResponseAPDU.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\SCardLoader.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\SCardManager.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\SCardReader.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\EMVCard.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\Common\SCard.h"> + <Filter>Header Files</Filter> + </ClInclude> </ItemGroup> <ItemGroup> <None Include="..\Boot\Windows\Release_Serpent_SHA2\BootSector.bin"> diff --git a/src/Format/FormatCom.cpp b/src/Format/FormatCom.cpp index 10757765..90333f23 100644 --- a/src/Format/FormatCom.cpp +++ b/src/Format/FormatCom.cpp @@ -92,11 +92,11 @@ public: virtual BOOL STDMETHODCALLTYPE FormatNtfs (int driveNo, int clusterSize) { - return ::FormatNtfs (driveNo, clusterSize); + return ::FormatNtfs (driveNo, clusterSize, TRUE); } virtual int STDMETHODCALLTYPE AnalyzeHiddenVolumeHost ( - LONG_PTR hwndDlg, int *driveNo, __int64 hiddenVolHostSize, int *realClusterSize, __int64 *nbrFreeClusters) + __int64 hwndDlg, int *driveNo, __int64 hiddenVolHostSize, int *realClusterSize, __int64 *nbrFreeClusters) { return ::AnalyzeHiddenVolumeHost ( (HWND) hwndDlg, driveNo, hiddenVolHostSize, realClusterSize, nbrFreeClusters); @@ -134,7 +134,7 @@ public: virtual BOOL STDMETHODCALLTYPE FormatFs (int driveNo, int clusterSize, int fsType) { - return ::FormatFs (driveNo, clusterSize, fsType); + return ::FormatFs (driveNo, clusterSize, fsType, TRUE); } virtual DWORD STDMETHODCALLTYPE GetFileSize (BSTR filePath, unsigned __int64 *pSize) @@ -182,6 +182,16 @@ public: return BaseCom::UpdateSetupConfigFile (bForInstall); } + virtual DWORD STDMETHODCALLTYPE NotifyService (DWORD dwNotifyCode) + { + return BaseCom::NotifyService (dwNotifyCode); + } + + virtual DWORD STDMETHODCALLTYPE FastFileResize (BSTR filePath, __int64 fileSize) + { + return BaseCom::FastFileResize (filePath, fileSize); + } + protected: DWORD MessageThreadId; LONG RefCount; @@ -245,12 +255,12 @@ extern "C" int UacFormatNtfs (HWND hWnd, int driveNo, int clusterSize) CComPtr<ITrueCryptFormatCom> tc; int r; - CoInitialize (NULL); + CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE); if (ComGetInstance (hWnd, &tc)) r = tc->FormatNtfs (driveNo, clusterSize); else - r = 0; + r = (int) GetLastError(); CoUninitialize (); @@ -262,12 +272,12 @@ extern "C" int UacFormatFs (HWND hWnd, int driveNo, int clusterSize, int fsType) CComPtr<ITrueCryptFormatCom> tc; int r; - CoInitialize (NULL); + CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE); if (ComGetInstance (hWnd, &tc)) r = tc->FormatFs (driveNo, clusterSize, fsType); else - r = 0; + r = (int) GetLastError(); CoUninitialize (); @@ -280,10 +290,10 @@ extern "C" int UacAnalyzeHiddenVolumeHost (HWND hwndDlg, int *driveNo, __int64 h CComPtr<ITrueCryptFormatCom> tc; int r; - CoInitialize (NULL); + CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE); if (ComGetInstance (hwndDlg, &tc)) - r = tc->AnalyzeHiddenVolumeHost ((LONG_PTR) hwndDlg, driveNo, hiddenVolHostSize, realClusterSize, nbrFreeClusters); + r = tc->AnalyzeHiddenVolumeHost ((__int64) hwndDlg, driveNo, hiddenVolHostSize, realClusterSize, nbrFreeClusters); else r = 0; @@ -291,3 +301,68 @@ extern "C" int UacAnalyzeHiddenVolumeHost (HWND hwndDlg, int *driveNo, __int64 h return r; } + +extern "C" BOOL UacWriteLocalMachineRegistryDword (HWND hwndDlg, wchar_t *keyPath, wchar_t *valueName, DWORD value) +{ + CComPtr<ITrueCryptFormatCom> tc; + int r = 0; + + CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE); + + if (ComGetInstance (hwndDlg, &tc)) + { + CComBSTR keyPathBstr, valueNameBstr; + BSTR bstr = W2BSTR(keyPath); + if (bstr) + { + keyPathBstr.Attach (bstr); + bstr = W2BSTR(valueName); + if (bstr) + { + valueNameBstr.Attach (bstr); + r = tc->WriteLocalMachineRegistryDwordValue (keyPathBstr, valueNameBstr, value); + } + else + r = ERROR_OUTOFMEMORY; + } + else + r = ERROR_OUTOFMEMORY; + } + + CoUninitialize (); + + if (r == ERROR_SUCCESS) + return TRUE; + else + { + SetLastError (r); + return FALSE; + } +} + +extern "C" DWORD UacFastFileCreation (HWND hWnd, wchar_t* filePath, __int64 fileSize) +{ + CComPtr<ITrueCryptFormatCom> tc; + DWORD r; + + CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE); + + if (ComGetInstance (hWnd, &tc)) + { + CComBSTR filePathBstr; + BSTR bstr = W2BSTR(filePath); + if (bstr) + { + filePathBstr.Attach (bstr); + r = tc->FastFileResize (filePathBstr, fileSize); + } + else + r = ERROR_OUTOFMEMORY; + } + else + r = GetLastError(); + + CoUninitialize (); + + return r; +} diff --git a/src/Format/FormatCom.h b/src/Format/FormatCom.h index 5f03961b..e474608d 100644 --- a/src/Format/FormatCom.h +++ b/src/Format/FormatCom.h @@ -29,6 +29,8 @@ int UacFormatFs (HWND hWnd, int driveNo, int clusterSize, int fsType); int UacAnalyzeHiddenVolumeHost (HWND hwndDlg, int *driveNo, __int64 hiddenVolHostSize, int *realClusterSize, __int64 *nbrFreeClusters); int UacFormatVolume (char *cvolumePath , BOOL bDevice , unsigned __int64 size , unsigned __int64 hiddenVolHostSize , Password *password , int cipher , int pkcs5 , BOOL quickFormat, BOOL sparseFileSwitch, int fileSystem , int clusterSize, HWND hwndDlg , BOOL hiddenVol , int *realClusterSize); BOOL UacUpdateProgressBar (__int64 nSecNo, BOOL *bVolTransformThreadCancel); +BOOL UacWriteLocalMachineRegistryDword (HWND hwndDlg, wchar_t *keyPath, wchar_t *valueName, DWORD value); +DWORD UacFastFileCreation (HWND hWnd, wchar_t* filePath, __int64 fileSize); #ifdef __cplusplus } diff --git a/src/Format/FormatCom.idl b/src/Format/FormatCom.idl index e5135191..7276de81 100644 --- a/src/Format/FormatCom.idl +++ b/src/Format/FormatCom.idl @@ -16,7 +16,7 @@ import "..\Common\Password.h"; [ uuid(56327DDA-F1A7-4e13-B128-520D129BDEF6), helpstring("VeraCrypt Format UAC Support Library"), - version(2.8) // Update ComSetup.cpp when changing version number + version(2.10) // Update ComSetup.cpp when changing version number ] library TrueCryptFormatCom { @@ -28,7 +28,7 @@ library TrueCryptFormatCom ] interface ITrueCryptFormatCom : IUnknown { - int AnalyzeHiddenVolumeHost (LONG_PTR hwndDlg, int *driveNo, __int64 hiddenVolHostSize, int *realClusterSize, __int64 *nbrFreeClusters); + int AnalyzeHiddenVolumeHost (__int64 hwndDlg, int *driveNo, __int64 hiddenVolHostSize, int *realClusterSize, __int64 *nbrFreeClusters); DWORD CallDriver (DWORD ioctl, BSTR input, BSTR *output); DWORD CopyFile (BSTR sourceFile, BSTR destinationFile); DWORD DeleteFile (BSTR file); @@ -49,6 +49,8 @@ library TrueCryptFormatCom DWORD WriteEfiBootSectorUserConfig (DWORD userConfig, BSTR customUserMessage, int pim, int hashAlg); DWORD UpdateSetupConfigFile (BOOL bForInstall); DWORD GetSecureBootConfig (BOOL* pSecureBootEnabled, BOOL *pVeraCryptKeysLoaded); + DWORD NotifyService (DWORD dwNotifyCode); + DWORD FastFileResize (BSTR filePath, __int64 fileSize); }; [ diff --git a/src/Format/Format_vs2019.vcxproj b/src/Format/Format_vs2019.vcxproj new file mode 100644 index 00000000..95f61615 --- /dev/null +++ b/src/Format/Format_vs2019.vcxproj @@ -0,0 +1,770 @@ +<?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|ARM64"> + <Configuration>Debug</Configuration> + <Platform>ARM64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="ReleaseCustomEFI|ARM64"> + <Configuration>ReleaseCustomEFI</Configuration> + <Platform>ARM64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="ReleaseCustomEFI|Win32"> + <Configuration>ReleaseCustomEFI</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="ReleaseCustomEFI|x64"> + <Configuration>ReleaseCustomEFI</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|ARM64"> + <Configuration>Release</Configuration> + <Platform>ARM64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}</ProjectGuid> + <RootNamespace>Format</RootNamespace> + <Keyword>Win32Proj</Keyword> + <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> + <ProjectName>Format</ProjectName> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <PlatformToolset>v142</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <PlatformToolset>v142</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <PlatformToolset>v142</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <PlatformToolset>v142</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <PlatformToolset>v142</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <PlatformToolset>v142</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <PlatformToolset>v142</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <PlatformToolset>v142</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <PlatformToolset>v142</PlatformToolset> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" 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|Win32'" 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"> + <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"> + <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|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)'=='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> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(Platform)\$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(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> + <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</GenerateManifest> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">Release\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">Release\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">false</LinkIncremental> + <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateManifest> + <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</GenerateManifest> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(Platform)\$(Configuration)\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(Platform)\$(Configuration)\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">$(Platform)\$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(Platform)\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(Platform)\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">$(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> + <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|Win32'">VeraCryptFormat</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">VeraCryptFormat</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">VeraCryptFormat</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">VeraCryptFormat</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">VeraCryptFormat</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">VeraCryptFormat</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">VeraCryptFormat</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">VeraCryptFormat</TargetName> + <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">VeraCryptFormat</TargetName> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <Midl> + <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> + </Midl> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>VOLFORMAT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <BufferSecurityCheck>true</BufferSecurityCheck> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + <DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + <Link> + <AdditionalDependencies>..\Crypto\Debug\crypto.lib;..\Common\Debug\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>$(OutDir)Format.pdb</ProgramDatabaseFile> + <SubSystem>Windows</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention>true</DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + <Manifest> + <AdditionalManifestFiles>Format.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> + </Manifest> + <PostBuildEvent> + <Command>md "..\Debug\Setup Files" 2>NUL: +copy Debug\VeraCryptFormat.exe "..\Debug\Setup Files\VeraCrypt Format.exe" >NUL: +</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <Midl> + <TargetEnvironment>X64</TargetEnvironment> + <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> + </Midl> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>VOLFORMAT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <BufferSecurityCheck>true</BufferSecurityCheck> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + <Link> + <AdditionalDependencies>..\Crypto\ARM64\Debug\crypto.lib;..\Common\ARM64\Debug\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>$(OutDir)Format.pdb</ProgramDatabaseFile> + <SubSystem>Windows</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention>true</DataExecutionPrevention> + <TargetMachine>MachineX64</TargetMachine> + </Link> + <Manifest> + <AdditionalManifestFiles>Format.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> + </Manifest> + <PostBuildEvent> + <Command>md "..\Debug\Setup Files" 2>NUL: +copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" >NUL: +</Command> + </PostBuildEvent> + <ResourceCompile> + <PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ResourceCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> + <Midl> + <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> + </Midl> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>VOLFORMAT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <BufferSecurityCheck>true</BufferSecurityCheck> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + <Link> + <AdditionalDependencies>..\Crypto\ARM64\Debug\crypto.lib;..\Common\ARM64\Debug\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>$(OutDir)Format.pdb</ProgramDatabaseFile> + <SubSystem>Windows</SubSystem> + <DataExecutionPrevention>true</DataExecutionPrevention> + </Link> + <Manifest> + <AdditionalManifestFiles>Format.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> + </Manifest> + <PostBuildEvent> + <Command>md "..\Debug\Setup Files" 2>NUL: +copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-arm64.exe" >NUL: +</Command> + </PostBuildEvent> + <ResourceCompile> + <PreprocessorDefinitions>WIN64;ARM64;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ResourceCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <Midl> + <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> + </Midl> + <ClCompile> + <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> + <Optimization>MaxSpeed</Optimization> + <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>VOLFORMAT;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>Level4</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + <Link> + <AdditionalDependencies>..\Crypto\Release\crypto.lib;..\Common\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.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>MachineX86</TargetMachine> + </Link> + <Manifest> + <AdditionalManifestFiles>Format.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> + </Manifest> + <PostBuildEvent> + <Command>copy Release\VeraCryptFormat.exe "..\Release\Setup Files\VeraCrypt Format.exe"</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'"> + <Midl> + <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> + </Midl> + <ClCompile> + <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> + <Optimization>MaxSpeed</Optimization> + <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>VOLFORMAT;VC_EFI_CUSTOM_MODE;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>Level4</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + <Link> + <AdditionalDependencies>..\Crypto\Release\crypto.lib;..\Common\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.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>MachineX86</TargetMachine> + </Link> + <Manifest> + <AdditionalManifestFiles>Format.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> + </Manifest> + <PostBuildEvent> + <Command>copy Release\VeraCryptFormat.exe "..\Release\Setup Files\VeraCrypt Format.exe"</Command> + </PostBuildEvent> + <ResourceCompile> + <PreprocessorDefinitions>VC_EFI_CUSTOM_MODE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ResourceCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <Midl> + <TargetEnvironment>X64</TargetEnvironment> + <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> + </Midl> + <ClCompile> + <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> + <Optimization>MaxSpeed</Optimization> + <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>VOLFORMAT;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>Level4</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + <Link> + <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.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> + </Link> + <Manifest> + <AdditionalManifestFiles>Format.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> + </Manifest> + <PostBuildEvent> + <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt Format-x64.exe"</Command> + </PostBuildEvent> + <ResourceCompile> + <PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ResourceCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> + <Midl> + <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> + </Midl> + <ClCompile> + <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> + <Optimization>MaxSpeed</Optimization> + <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>VOLFORMAT;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>Level4</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + <Link> + <AdditionalDependencies>..\Crypto\ARM64\Release\crypto.lib;..\Common\ARM64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.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> + </Link> + <Manifest> + <AdditionalManifestFiles>Format.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> + </Manifest> + <PostBuildEvent> + <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt Format-arm64.exe"</Command> + </PostBuildEvent> + <ResourceCompile> + <PreprocessorDefinitions>WIN64;ARM64;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ResourceCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'"> + <Midl> + <TargetEnvironment>X64</TargetEnvironment> + <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> + </Midl> + <ClCompile> + <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> + <Optimization>MaxSpeed</Optimization> + <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>VOLFORMAT;VC_EFI_CUSTOM_MODE;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>Level4</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + <Link> + <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.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> + </Link> + <Manifest> + <AdditionalManifestFiles>Format.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> + </Manifest> + <PostBuildEvent> + <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt Format-x64.exe"</Command> + </PostBuildEvent> + <ResourceCompile> + <PreprocessorDefinitions>VC_EFI_CUSTOM_MODE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ResourceCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'"> + <Midl> + <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName> + </Midl> + <ClCompile> + <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions> + <Optimization>MaxSpeed</Optimization> + <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>VOLFORMAT;VC_EFI_CUSTOM_MODE;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>Level4</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings> + </ClCompile> + <Link> + <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;comdlg32.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> + </Link> + <Manifest> + <AdditionalManifestFiles>Format.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles> + </Manifest> + <PostBuildEvent> + <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt Format-arm64.exe"</Command> + </PostBuildEvent> + <ResourceCompile> + <PreprocessorDefinitions>VC_EFI_CUSTOM_MODE;WIN64;ARM64;%(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="FormatCom.cpp" /> + <ClCompile Include="InPlace.c"> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">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="Tcformat.c"> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">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)'=='Debug|ARM64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">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)'=='Debug|ARM64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">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\Fat.c" /> + <ClCompile Include="..\Common\Format.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)'=='Debug|ARM64'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs> + <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">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" /> + <ClCompile Include="..\Common\Progress.c" /> + <ClCompile Include="..\Common\Random.c" /> + <ClCompile Include="..\Common\Registry.c" /> + <ClCompile Include="..\Common\SecurityToken.cpp" /> + <ClCompile Include="..\Common\Tests.c" /> + <ClCompile Include="..\Common\Volumes.c" /> + <ClCompile Include="..\Common\Wipe.c" /> + <ClCompile Include="..\Common\Xml.c" /> + <ClCompile Include="..\Common\Xts.c" /> + </ItemGroup> + <ItemGroup> + <Midl Include="FormatCom.idl" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\Common\BaseCom.h" /> + <ClInclude Include="..\Common\CommandAPDU.h" /> + <ClInclude Include="..\Common\Common.h" /> + <ClInclude Include="..\Common\Crc.h" /> + <ClInclude Include="..\Common\Crypto.h" /> + <ClInclude Include="..\Common\Dictionary.h" /> + <ClInclude Include="..\Common\Dlgcode.h" /> + <ClInclude Include="..\Common\EMVCard.h" /> + <ClInclude Include="..\Common\EMVToken.h" /> + <ClInclude Include="..\Common\EncryptionThreadPool.h" /> + <ClInclude Include="..\Common\Endian.h" /> + <ClInclude Include="..\Common\Exception.h" /> + <ClInclude Include="..\Common\Fat.h" /> + <ClInclude Include="..\Common\Format.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="FormatCom.h" /> + <ClInclude Include="..\Common\GfMul.h" /> + <ClInclude Include="InPlace.h" /> + <ClInclude Include="..\Common\Keyfiles.h" /> + <ClInclude Include="..\Common\Language.h" /> + <ClInclude Include="..\Mount\Mount.h" /> + <ClInclude Include="..\Common\Pkcs5.h" /> + <ClInclude Include="..\Common\Progress.h" /> + <ClInclude Include="..\Common\Random.h" /> + <ClInclude Include="..\Common\Registry.h" /> + <ClInclude Include="resource.h" /> + <ClInclude Include="..\Common\Resource.h" /> + <ClInclude Include="..\Common\SecurityToken.h" /> + <ClInclude Include="..\Common\Tcdefs.h" /> + <ClInclude Include="Tcformat.h" /> + <ClInclude Include="..\Common\Tests.h" /> + <ClInclude Include="..\Common\Volumes.h" /> + <ClInclude Include="..\Common\Wipe.h" /> + <ClInclude Include="..\Common\Xml.h" /> + <ClInclude Include="..\Common\Xts.h" /> + </ItemGroup> + <ItemGroup> + <None Include="..\Boot\Windows\Release_Camellia\BootSector.bin" /> + <None Include="..\Boot\Windows\Release_Camellia_SHA2\BootSector.bin" /> + <None Include="..\Boot\Windows\Release_Serpent_SHA2\BootSector.bin" /> + <None Include="..\Boot\Windows\Rescue_Camellia\BootSector.bin" /> + <None Include="..\Boot\Windows\Rescue_Camellia_SHA2\BootSector.bin" /> + <None Include="..\Boot\Windows\Rescue_Twofish_SHA2\BootSector.bin" /> + <None Include="..\Boot\Windows\Rescue_Serpent_SHA2\BootSector.bin" /> + <None Include="..\Boot\Windows\Rescue_AES_SHA2\BootSector.bin" /> + <None Include="..\Boot\Windows\Rescue_SHA2\BootSector.bin" /> + <None Include="..\Boot\Windows\Release_SHA2\BootSector.bin" /> + <None Include="..\Boot\Windows\Release_AES_SHA2\BootSector.bin" /> + <None Include="..\Boot\Windows\Release_Twofish_SHA2\BootSector.bin" /> + <None Include="Format.tlb"> + <SubType>Designer</SubType> + </None> + <None Include="..\Common\VeraCrypt_mounted.ico" /> + <None Include="..\Common\VeraCrypt_Volume.ico" /> + <None Include="VeraCrypt_wizard.bmp" /> + <None Include="..\Boot\Windows\Release_AES\BootLoader.com.gz" /> + <None Include="..\Boot\Windows\Release\BootLoader.com.gz" /> + <None Include="..\Boot\Windows\Release_Twofish\BootLoader.com.gz" /> + <None Include="..\Boot\Windows\Rescue_Serpent\BootLoader.com.gz" /> + <None Include="..\Boot\Windows\Rescue_AES\BootLoader.com.gz" /> + <None Include="..\Boot\Windows\Rescue\BootLoader.com.gz" /> + <None Include="..\Boot\Windows\Rescue_Twofish\BootLoader.com.gz" /> + <None Include="..\Boot\Windows\Release_Serpent\BootLoader.com.gz" /> + <None Include="..\Boot\Windows\Rescue_AES\BootSector.bin" /> + <None Include="..\Boot\Windows\Rescue\BootSector.bin" /> + <None Include="..\Boot\Windows\Release\BootSector.bin" /> + <None Include="..\Boot\Windows\Release_Serpent\BootSector.bin" /> + <None Include="..\Boot\Windows\Rescue_Serpent\BootSector.bin" /> + <None Include="..\Boot\Windows\Rescue_Twofish\BootSector.bin" /> + <None Include="..\Boot\Windows\Release_Twofish\BootSector.bin" /> + <None Include="..\Boot\Windows\Release_AES\BootSector.bin" /> + <None Include="..\Boot\Windows\Release\Decompressor.com" /> + <None Include="..\Common\Language.xml" /> + <None Include="..\Resources\Texts\License.rtf" /> + <None Include="..\Common\Textual_logo_288dpi.bmp" /> + <None Include="..\Common\Textual_logo_96dpi.bmp" /> + <None Include="..\Common\Textual_logo_background.bmp" /> + <None Include="..\Common\VeraCrypt.ico" /> + </ItemGroup> + <ItemGroup> + <Manifest Include="Format.manifest" /> + </ItemGroup> + <ItemGroup> + <ResourceCompile Include="Format.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)'=='Debug|ARM64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">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> + <ProjectReference Include="..\Common\Lzma_vs2019.vcxproj"> + <Project>{b896fe1f-6bf3-4f75-9148-f841829073d9}</Project> + </ProjectReference> + <ProjectReference Include="..\Crypto\Crypto_vs2019.vcxproj"> + <Project>{993245cf-6b70-47ee-91bb-39f8fc6dc0e7}</Project> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/src/Format/Format_vs2019.vcxproj.user b/src/Format/Format_vs2019.vcxproj.user new file mode 100644 index 00000000..88a55094 --- /dev/null +++ b/src/Format/Format_vs2019.vcxproj.user @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup /> +</Project>
\ No newline at end of file diff --git a/src/Format/InPlace.c b/src/Format/InPlace.c index 7117a8a4..b1483631 100644 --- a/src/Format/InPlace.c +++ b/src/Format/InPlace.c @@ -89,6 +89,8 @@ static __int64 NewFileSysSizeAfterShrink (HANDLE dev, const wchar_t *devicePath, } if ( (ntfsVolData.NumberSectors.QuadPart <= 0) + || (ntfsVolData.BytesPerSector == 0) + || (ntfsVolData.BytesPerSector >= (DWORD) UINT_MAX) || (ntfsVolData.NumberSectors.QuadPart > (INT64_MAX / (__int64) ntfsVolData.BytesPerSector)) // overflow test ) { @@ -591,7 +593,7 @@ int EncryptPartitionInPlaceBegin (volatile FORMAT_VOL_PARAMETERS *volParams, vol offset.QuadPart = TC_VOLUME_DATA_OFFSET + dataAreaSize; - if (!SetFilePointerEx (dev, offset, NULL, FILE_BEGIN)) + if (!MoveFilePointer (dev, offset)) { nStatus = ERR_OS_ERROR; goto closing_seq; @@ -637,7 +639,7 @@ int EncryptPartitionInPlaceBegin (volatile FORMAT_VOL_PARAMETERS *volParams, vol offset.QuadPart += TC_HIDDEN_VOLUME_HEADER_OFFSET; - if (!SetFilePointerEx (dev, offset, NULL, FILE_BEGIN)) + if (!MoveFilePointer (dev, offset)) { nStatus = ERR_OS_ERROR; goto closing_seq; @@ -774,6 +776,9 @@ int EncryptPartitionInPlaceResume (HANDLE dev, int pim = volParams->pim; DISK_GEOMETRY driveGeometry; HWND hwndDlg = volParams->hwndDlg; +#ifdef _WIN64 + BOOL bIsRamEncryptionEnabled = IsRamEncryptionEnabled(); +#endif bInPlaceEncNonSysResumed = TRUE; @@ -870,7 +875,7 @@ int EncryptPartitionInPlaceResume (HANDLE dev, goto closing_seq; #ifdef _WIN64 - if (IsRamEncryptionEnabled ()) + if (bIsRamEncryptionEnabled) { VcProtectKeys (masterCryptoInfo, VcGetEncryptionID (masterCryptoInfo)); VcProtectKeys (headerCryptoInfo, VcGetEncryptionID (headerCryptoInfo)); @@ -911,7 +916,7 @@ inplace_enc_read: offset.QuadPart = masterCryptoInfo->EncryptedAreaStart.Value - workChunkSize - TC_VOLUME_DATA_OFFSET; - if (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0) + if (MoveFilePointer (dev, offset) == 0) { nStatus = ERR_OS_ERROR; goto closing_seq; @@ -1002,14 +1007,14 @@ inplace_enc_read: memcpy (wipeRandCharsUpdate, wipeBuffer, sizeof (wipeRandCharsUpdate)); } - if (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0 + if (MoveFilePointer (dev, offset) == 0 || WriteFile (dev, wipeBuffer, workChunkSize, &n, NULL) == 0) { // Write error dwError = GetLastError(); // Undo failed write operation - if (workChunkSize > TC_VOLUME_DATA_OFFSET && SetFilePointerEx (dev, offset, NULL, FILE_BEGIN)) + if (workChunkSize > TC_VOLUME_DATA_OFFSET && MoveFilePointer (dev, offset)) { DecryptDataUnits ((byte *) buf, &unitNo, workChunkSize / ENCRYPTION_DATA_UNIT_SIZE, masterCryptoInfo); WriteFile (dev, buf + TC_VOLUME_DATA_OFFSET, workChunkSize - TC_VOLUME_DATA_OFFSET, &n, NULL); @@ -1029,7 +1034,7 @@ inplace_enc_read: offset.QuadPart = masterCryptoInfo->EncryptedAreaStart.Value - workChunkSize; - if (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0) + if (MoveFilePointer (dev, offset) == 0) { nStatus = ERR_OS_ERROR; goto closing_seq; @@ -1041,7 +1046,7 @@ inplace_enc_read: dwError = GetLastError(); // Undo failed write operation - if (workChunkSize > TC_VOLUME_DATA_OFFSET && SetFilePointerEx (dev, offset, NULL, FILE_BEGIN)) + if (workChunkSize > TC_VOLUME_DATA_OFFSET && MoveFilePointer (dev, offset)) { DecryptDataUnits ((byte *) buf, &unitNo, workChunkSize / ENCRYPTION_DATA_UNIT_SIZE, masterCryptoInfo); WriteFile (dev, buf + TC_VOLUME_DATA_OFFSET, workChunkSize - TC_VOLUME_DATA_OFFSET, &n, NULL); @@ -1097,6 +1102,19 @@ inplace_enc_read: { PCRYPTO_INFO dummyInfo = NULL; +#ifdef _WIN64 + CRYPTO_INFO tmpCI; + PCRYPTO_INFO cryptoInfoBackup = NULL; + if (bIsRamEncryptionEnabled) + { + VirtualLock (&tmpCI, sizeof(tmpCI)); + memcpy (&tmpCI, masterCryptoInfo, sizeof (CRYPTO_INFO)); + VcUnprotectKeys (&tmpCI, VcGetEncryptionID (masterCryptoInfo)); + cryptoInfoBackup = masterCryptoInfo; + masterCryptoInfo = &tmpCI; + } +#endif + nStatus = CreateVolumeHeaderInMemory (hwndDlg, FALSE, header, headerCryptoInfo->ea, @@ -1115,22 +1133,50 @@ inplace_enc_read: masterCryptoInfo->SectorSize, wipeAlgorithm == TC_WIPE_NONE ? FALSE : (wipePass < PRAND_HEADER_WIPE_PASSES - 1)); +#ifdef _WIN64 + if (bIsRamEncryptionEnabled) + { + masterCryptoInfo = cryptoInfoBackup; + burn (&tmpCI, sizeof (CRYPTO_INFO)); + VirtualUnlock (&tmpCI, sizeof(tmpCI)); + } +#endif + if (nStatus != ERR_SUCCESS) goto closing_seq; offset.QuadPart = TC_VOLUME_HEADER_OFFSET; - if (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0 + if (MoveFilePointer (dev, offset) == 0 || !WriteEffectiveVolumeHeader (TRUE, dev, (byte *) header)) { nStatus = ERR_OS_ERROR; goto closing_seq; } +#ifdef _WIN64 + if (bIsRamEncryptionEnabled) + { + VirtualLock (&tmpCI, sizeof(tmpCI)); + memcpy (&tmpCI, headerCryptoInfo, sizeof (CRYPTO_INFO)); + VcUnprotectKeys (&tmpCI, VcGetEncryptionID (headerCryptoInfo)); + cryptoInfoBackup = headerCryptoInfo; + headerCryptoInfo = &tmpCI; + } +#endif // Fill the reserved sectors of the header area with random data nStatus = WriteRandomDataToReservedHeaderAreas (hwndDlg, dev, headerCryptoInfo, masterCryptoInfo->VolumeSize.Value, TRUE, FALSE); +#ifdef _WIN64 + if (bIsRamEncryptionEnabled) + { + headerCryptoInfo = cryptoInfoBackup; + burn (&tmpCI, sizeof (CRYPTO_INFO)); + VirtualUnlock (&tmpCI, sizeof(tmpCI)); + } +#endif + if (nStatus != ERR_SUCCESS) goto closing_seq; @@ -1161,7 +1207,7 @@ inplace_enc_read: offset.QuadPart += TC_HIDDEN_VOLUME_HEADER_OFFSET; - if (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0 + if (MoveFilePointer (dev, offset) == 0 || !WriteEffectiveVolumeHeader (TRUE, dev, (byte *) header)) { nStatus = ERR_OS_ERROR; @@ -1290,6 +1336,9 @@ int DecryptPartitionInPlace (volatile FORMAT_VOL_PARAMETERS *volParams, volatile int pkcs5_prf = volParams->pkcs5; int pim = volParams->pim; DISK_GEOMETRY driveGeometry; +#ifdef _WIN64 + BOOL bIsRamEncryptionEnabled = IsRamEncryptionEnabled(); +#endif buf = (char *) TCalloc (TC_MAX_NONSYS_INPLACE_ENC_WORK_CHUNK_SIZE); @@ -1397,7 +1446,7 @@ int DecryptPartitionInPlace (volatile FORMAT_VOL_PARAMETERS *volParams, volatile goto closing_seq; #ifdef _WIN64 - if (IsRamEncryptionEnabled ()) + if (bIsRamEncryptionEnabled) { VcProtectKeys (masterCryptoInfo, VcGetEncryptionID (masterCryptoInfo)); VcProtectKeys (headerCryptoInfo, VcGetEncryptionID (headerCryptoInfo)); @@ -1495,7 +1544,7 @@ int DecryptPartitionInPlace (volatile FORMAT_VOL_PARAMETERS *volParams, volatile offset.QuadPart = workChunkStartByteOffset; - if (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0) + if (MoveFilePointer (dev, offset) == 0) { nStatus = ERR_OS_ERROR; goto closing_seq; @@ -1529,7 +1578,7 @@ int DecryptPartitionInPlace (volatile FORMAT_VOL_PARAMETERS *volParams, volatile for (tmpSectorCount = workChunkSize / sectorSize; tmpSectorCount > 0; --tmpSectorCount) { - if (SetFilePointerEx (dev, tmpSectorOffset, NULL, FILE_BEGIN) == 0) + if (MoveFilePointer (dev, tmpSectorOffset) == 0) { nStatus = ERR_OS_ERROR; goto closing_seq; @@ -1591,7 +1640,7 @@ int DecryptPartitionInPlace (volatile FORMAT_VOL_PARAMETERS *volParams, volatile offset.QuadPart = workChunkStartByteOffset - TC_VOLUME_DATA_OFFSET; - if (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0) + if (MoveFilePointer (dev, offset) == 0) { nStatus = ERR_OS_ERROR; goto closing_seq; @@ -1675,7 +1724,7 @@ int DecryptPartitionInPlace (volatile FORMAT_VOL_PARAMETERS *volParams, volatile offset.QuadPart <= deviceSize - sectorSize; offset.QuadPart += sectorSize) { - if (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0) + if (MoveFilePointer (dev, offset) == 0) { nStatus = ERR_OS_ERROR; goto closing_seq; @@ -1799,6 +1848,9 @@ int FastVolumeHeaderUpdate (HANDLE dev, CRYPTO_INFO *headerCryptoInfo, CRYPTO_IN uint32 headerCrc32; byte *fieldPos; PCRYPTO_INFO pCryptoInfo = headerCryptoInfo; +#ifdef _WIN64 + BOOL bIsRamEncryptionEnabled = IsRamEncryptionEnabled(); +#endif header = (byte *) TCalloc (TC_VOLUME_HEADER_EFFECTIVE_SIZE); @@ -1812,7 +1864,7 @@ int FastVolumeHeaderUpdate (HANDLE dev, CRYPTO_INFO *headerCryptoInfo, CRYPTO_IN offset.QuadPart = deviceSize - TC_VOLUME_HEADER_GROUP_SIZE; - if (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0 + if (MoveFilePointer (dev, offset) == 0 || !ReadEffectiveVolumeHeader (TRUE, dev, header, &n) || n < TC_VOLUME_HEADER_EFFECTIVE_SIZE) { nStatus = ERR_OS_ERROR; @@ -1820,7 +1872,7 @@ int FastVolumeHeaderUpdate (HANDLE dev, CRYPTO_INFO *headerCryptoInfo, CRYPTO_IN } #ifdef _WIN64 - if (IsRamEncryptionEnabled()) + if (bIsRamEncryptionEnabled) { pCryptoInfo = crypto_open(); if (!pCryptoInfo) @@ -1861,7 +1913,7 @@ int FastVolumeHeaderUpdate (HANDLE dev, CRYPTO_INFO *headerCryptoInfo, CRYPTO_IN EncryptBuffer (header + HEADER_ENCRYPTED_DATA_OFFSET, HEADER_ENCRYPTED_DATA_SIZE, pCryptoInfo); - if (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0 + if (MoveFilePointer (dev, offset) == 0 || !WriteEffectiveVolumeHeader (TRUE, dev, header)) { nStatus = ERR_OS_ERROR; @@ -1874,7 +1926,7 @@ closing_seq: dwError = GetLastError(); #ifdef _WIN64 - if (IsRamEncryptionEnabled() && pCryptoInfo) + if (bIsRamEncryptionEnabled && pCryptoInfo) { crypto_close(pCryptoInfo); } @@ -2040,7 +2092,7 @@ static int ConcealNTFS (HANDLE dev) offset.QuadPart = 0; - if (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0) + if (MoveFilePointer (dev, offset) == 0) return ERR_OS_ERROR; if (ReadFile (dev, buf, TC_INITIAL_NTFS_CONCEAL_PORTION_SIZE, &nbrBytesProcessed, NULL) == 0) @@ -2051,7 +2103,7 @@ static int ConcealNTFS (HANDLE dev) offset.QuadPart = 0; - if (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0) + if (MoveFilePointer (dev, offset) == 0) return ERR_OS_ERROR; if (WriteFile (dev, buf, TC_INITIAL_NTFS_CONCEAL_PORTION_SIZE, &nbrBytesProcessed, NULL) == 0) @@ -2070,7 +2122,7 @@ static int ConcealNTFS (HANDLE dev) { Sleep (1); } - while (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0 + while (MoveFilePointer (dev, offset) == 0 || WriteFile (dev, buf, TC_INITIAL_NTFS_CONCEAL_PORTION_SIZE, &nbrBytesProcessed2, NULL) == 0); SetLastError (dwError); @@ -2146,6 +2198,38 @@ BOOL SaveNonSysInPlaceEncSettings (int delta, WipeAlgorithmId newWipeAlgorithm, return SaveBufferToFile (str, GetConfigPath (TC_APPD_FILENAME_NONSYS_INPLACE_ENC), (DWORD) strlen(str), FALSE, FALSE); } +// This function moves the file pointer to the given offset. It first retrieves the current +// file position using SetFilePointerEx() with FILE_CURRENT as the reference point, and then +// calculates the difference between the current position and the desired position. Subsequently, +// it moves the file pointer by the difference calculated using SetFilePointerEx() again. +// +// This approach of moving the file pointer relatively (instead of absolutely) was implemented +// as a workaround to address the performance issues related to in-place encryption. When using +// SetFilePointerEx() with FILE_BEGIN as the reference point, reaching the end of large drives +// during in-place encryption can cause significant slowdowns. By moving the file pointer +// relatively, these performance issues are mitigated. +// +// We fall back to absolute positioning if the relative positioning fails. +BOOL MoveFilePointer (HANDLE dev, LARGE_INTEGER offset) +{ + LARGE_INTEGER currOffset; + LARGE_INTEGER diffOffset; + + currOffset.QuadPart = 0; + if (SetFilePointerEx (dev, currOffset, &currOffset, FILE_CURRENT)) + { + diffOffset.QuadPart = offset.QuadPart - currOffset.QuadPart; + if (diffOffset.QuadPart == 0) + return TRUE; + + // Moves the file pointer by the difference between current and desired positions + if (SetFilePointerEx (dev, diffOffset, NULL, FILE_CURRENT)) + return TRUE; + } + + // An error occurred, fallback to absolute positioning + return SetFilePointerEx (dev, offset, NULL, FILE_BEGIN); +} // Repairs damaged sectors (i.e. those with read errors) by zeroing them. // Note that this operating fails if there are any write errors. @@ -2165,7 +2249,7 @@ int ZeroUnreadableSectors (HANDLE dev, LARGE_INTEGER startOffset, int64 size, in if (!sectorBuffer) return ERR_OUTOFMEMORY; - if (SetFilePointerEx (dev, startOffset, NULL, FILE_BEGIN) == 0) + if (!MoveFilePointer(dev, workOffset)) { nStatus = ERR_OS_ERROR; goto closing_seq; @@ -2178,7 +2262,8 @@ int ZeroUnreadableSectors (HANDLE dev, LARGE_INTEGER startOffset, int64 size, in { memset (sectorBuffer, 0, sectorSize); - if (SetFilePointerEx (dev, workOffset, NULL, FILE_BEGIN) == 0) + // If ReadFile failed, move back to start of the unreadable sector + if (MoveFilePointer (dev, workOffset) == 0) { nStatus = ERR_OS_ERROR; goto closing_seq; @@ -2229,7 +2314,7 @@ static int OpenBackupHeader (HANDLE dev, const wchar_t *devicePath, Password *pa offset.QuadPart = deviceSize - TC_VOLUME_HEADER_GROUP_SIZE; - if (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0 + if (MoveFilePointer (dev, offset) == 0 || !ReadEffectiveVolumeHeader (TRUE, dev, (byte *) header, &n) || n < TC_VOLUME_HEADER_EFFECTIVE_SIZE) { nStatus = ERR_OS_ERROR; @@ -2237,7 +2322,7 @@ static int OpenBackupHeader (HANDLE dev, const wchar_t *devicePath, Password *pa } - nStatus = ReadVolumeHeader (FALSE, header, password, pkcs5, pim, FALSE, retMasterCryptoInfo, headerCryptoInfo); + nStatus = ReadVolumeHeader (FALSE, header, password, pkcs5, pim, retMasterCryptoInfo, headerCryptoInfo); if (nStatus != ERR_SUCCESS) goto closing_seq; diff --git a/src/Format/Resource.h b/src/Format/Resource.h index c37a6f4a..d8fb8dc4 100644 --- a/src/Format/Resource.h +++ b/src/Format/Resource.h @@ -146,6 +146,7 @@ #define IDC_TB 1107 #define IDC_SKIP_RESCUE_VERIFICATION 1108 #define SPARSE_FILE 1109 +#define IDC_FORMAT_TYPE 1110 // Next default values for new objects // @@ -154,7 +155,7 @@ #define _APS_NO_MFC 1 #define _APS_NEXT_RESOURCE_VALUE 134 #define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1110 +#define _APS_NEXT_CONTROL_VALUE 1111 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif diff --git a/src/Format/Tcformat.c b/src/Format/Tcformat.c index 0841aaa6..658d3797 100644 --- a/src/Format/Tcformat.c +++ b/src/Format/Tcformat.c @@ -233,10 +233,12 @@ BOOL bKeybLayoutAltKeyWarningShown = FALSE; /* TRUE if the user has been informe BOOL bWarnOuterVolSuitableFileSys = TRUE; Password volumePassword; /* User password */ +Password outerVolumePassword; /* Outer volume user password */ char szVerify[MAX_PASSWORD + 1]; /* Tmp password buffer */ char szRawPassword[MAX_PASSWORD + 1]; /* Password before keyfile was applied to it */ int volumePim = 0; +int outerVolumePim = 0; BOOL bHistoryCmdLine = FALSE; /* History control is always disabled */ BOOL ComServerMode = FALSE; @@ -250,6 +252,7 @@ int CmdVolumeFilesystem = FILESYS_NONE; unsigned __int64 CmdVolumeFileSize = 0; BOOL CmdSparseFileSwitch = FALSE; BOOL CmdQuickFormat = FALSE; +BOOL CmdFastCreateFile = FALSE; BOOL bForceOperation = FALSE; @@ -259,6 +262,8 @@ BOOL bGuiMode = TRUE; BOOL bSystemIsGPT = FALSE; +KeyFile *FirstCmdKeyFile = NULL; + int nPbar = 0; /* Control ID of progress bar:- for format code */ wchar_t HeaderKeyGUIView [KEY_GUI_VIEW_SIZE]; @@ -282,8 +287,10 @@ BOOL bDisplayPoolContents = TRUE; volatile BOOL bSparseFileSwitch = FALSE; volatile BOOL quickFormat = FALSE; +volatile BOOL fastCreateFile = FALSE; volatile BOOL dynamicFormat = FALSE; /* this variable represents the sparse file flag. */ volatile int fileSystem = FILESYS_NONE; +volatile int formatType = FORMAT_TYPE_FULL; volatile int clusterSize = 0; SYSENC_MULTIBOOT_CFG SysEncMultiBootCfg; @@ -318,7 +325,7 @@ void CALLBACK ResumeInPlaceEncWaitThreadProc(void* pArg, HWND hwndDlg) if (device.Path == szDevicePath) { OpenVolumeContext volume; - int status = OpenVolume (&volume, device.Path.c_str(), &volumePassword, hash_algo, volumePim, FALSE, FALSE, FALSE, TRUE); + int status = OpenVolume (&volume, device.Path.c_str(), &volumePassword, hash_algo, volumePim, FALSE, FALSE, TRUE); if ( status == ERR_SUCCESS) { @@ -364,7 +371,7 @@ void CALLBACK ResumeInPlaceEncWaitThreadProc(void* pArg, HWND hwndDlg) OpenVolumeContext volume; - if (OpenVolume (&volume, device.Path.c_str(), &volumePassword, hash_algo, volumePim, FALSE, FALSE, FALSE, TRUE) == ERR_SUCCESS) + if (OpenVolume (&volume, device.Path.c_str(), &volumePassword, hash_algo, volumePim, FALSE, FALSE, TRUE) == ERR_SUCCESS) { if ((volume.CryptoInfo->HeaderFlags & TC_HEADER_FLAG_NONSYS_INPLACE_ENC) != 0 && volume.CryptoInfo->EncryptedAreaLength.Value != volume.CryptoInfo->VolumeSize.Value) @@ -407,15 +414,17 @@ static BOOL ElevateWholeWizardProcess (wstring arguments) } } -static void WipePasswordsAndKeyfiles (void) +static void WipePasswordsAndKeyfiles (bool bFull) { wchar_t tmp[MAX_PASSWORD+1]; // Attempt to wipe passwords stored in the input field buffers wmemset (tmp, L'X', MAX_PASSWORD); tmp [MAX_PASSWORD] = 0; - SetWindowText (hPasswordInputField, tmp); - SetWindowText (hVerifyPasswordInputField, tmp); + if (hPasswordInputField) + SetWindowText (hPasswordInputField, tmp); + if (hVerifyPasswordInputField) + SetWindowText (hVerifyPasswordInputField, tmp); burn (&szVerify[0], sizeof (szVerify)); burn (&volumePassword, sizeof (volumePassword)); @@ -424,8 +433,16 @@ static void WipePasswordsAndKeyfiles (void) burn (&CmdVolumePassword, sizeof (CmdVolumePassword)); burn (&CmdVolumePim, sizeof (CmdVolumePim)); - SetWindowText (hPasswordInputField, L""); - SetWindowText (hVerifyPasswordInputField, L""); + if (bFull) + { + burn (&outerVolumePassword, sizeof (outerVolumePassword)); + burn (&outerVolumePim, sizeof (outerVolumePim)); + } + + if (hPasswordInputField) + SetWindowText (hPasswordInputField, L""); + if (hVerifyPasswordInputField) + SetWindowText (hVerifyPasswordInputField, L""); KeyFileRemoveAll (&FirstKeyFile); KeyFileRemoveAll (&defaultKeyFilesParam.FirstKeyFile); @@ -471,7 +488,7 @@ static void localcleanup (void) WipeAbort(); - WipePasswordsAndKeyfiles (); + WipePasswordsAndKeyfiles (true); RandStop (TRUE); @@ -486,6 +503,8 @@ static void localcleanup (void) burn (szFileName, sizeof(szFileName)); burn (szDiskFile, sizeof(szDiskFile)); + KeyFileRemoveAll (&FirstCmdKeyFile); + // Attempt to wipe the GUI fields showing portions of randpool, of the master and header keys wmemset (tmp, L'X', ARRAYSIZE(tmp)); tmp [ARRAYSIZE(tmp)-1] = 0; @@ -703,7 +722,7 @@ static BOOL ChangeWizardMode (int newWizardMode) // If the previous mode was different, the password may have been typed using a different // keyboard layout (which might confuse the user and cause other problems if system encryption // was or will be involved). - WipePasswordsAndKeyfiles(); + WipePasswordsAndKeyfiles(true); } if (newWizardMode != WIZARD_MODE_NONSYS_DEVICE) @@ -783,6 +802,8 @@ static void LoadSettingsAndCheckModified (HWND hwndDlg, BOOL bOnlyCheckModified, ConfigReadCompareInt ("UseLegacyMaxPasswordLength", FALSE, &bUseLegacyMaxPasswordLength, bOnlyCheckModified, pbSettingsModified); + ConfigReadCompareInt ("EMVSupportEnabled", 0, &EMVSupportEnabled, bOnlyCheckModified, pbSettingsModified); + { char szTmp[MAX_PATH] = {0}; WideCharToMultiByte (CP_UTF8, 0, SecurityTokenLibraryPath, -1, szTmp, MAX_PATH, NULL, NULL); @@ -1085,24 +1106,6 @@ BOOL SwitchWizardToSysEncMode (void) if (AskWarnYesNoString ((wstring (GetString ("SYSDRIVE_NON_STANDARD_PARTITIONS")) + L"\n\n" + GetString ("ASK_ENCRYPT_PARTITION_INSTEAD_OF_DRIVE")).c_str(), MainDlg) == IDYES) bWholeSysDrive = FALSE; } - - if (!IsOSAtLeast (WIN_VISTA) && bWholeSysDrive) - { - if (BootEncObj->SystemDriveContainsExtendedPartition()) - { - bWholeSysDrive = FALSE; - - Error ("WDE_UNSUPPORTED_FOR_EXTENDED_PARTITIONS", MainDlg); - - if (AskYesNo ("ASK_ENCRYPT_PARTITION_INSTEAD_OF_DRIVE", MainDlg) == IDNO) - { - ChangeWizardMode (WIZARD_MODE_NONSYS_DEVICE); - return FALSE; - } - } - else - Warning ("WDE_EXTENDED_PARTITIONS_WARNING", MainDlg); - } } else if (BootEncObj->SystemPartitionCoversWholeDrive() && !bWholeSysDrive) @@ -1407,7 +1410,7 @@ void ComboSelChangeEA (HWND hwndDlg) int i, cnt = 0; nIndex = (int) SendMessage (GetDlgItem (hwndDlg, IDC_COMBO_BOX), CB_GETITEMDATA, nIndex, 0); - EAGetName (name, nIndex, 0); + EAGetName (name, ARRAYSIZE(name),nIndex, 0); if (wcscmp (name, L"AES") == 0) { @@ -2635,6 +2638,7 @@ static void __cdecl volTransformThreadFunction (void *hwndDlgArg) volParams->clusterSize = clusterSize; volParams->sparseFileSwitch = dynamicFormat; volParams->quickFormat = quickFormat; + volParams->fastCreateFile = fastCreateFile; volParams->sectorSize = GetFormatSectorSize(); volParams->realClusterSize = &realClusterSize; volParams->password = &volumePassword; @@ -3313,6 +3317,11 @@ BOOL IsSparseFile (HWND hwndDlg) if (bPreserveTimestamp) { + ftLastAccessTime.dwHighDateTime = 0xFFFFFFFF; + ftLastAccessTime.dwLowDateTime = 0xFFFFFFFF; + + SetFileTime (hFile, NULL, &ftLastAccessTime, NULL); + if (GetFileTime (hFile, NULL, &ftLastAccessTime, NULL) == 0) bTimeStampValid = FALSE; else @@ -3352,6 +3361,11 @@ BOOL GetFileVolSize (HWND hwndDlg, unsigned __int64 *size) if (bPreserveTimestamp) { + ftLastAccessTime.dwHighDateTime = 0xFFFFFFFF; + ftLastAccessTime.dwLowDateTime = 0xFFFFFFFF; + + SetFileTime (hFile, NULL, &ftLastAccessTime, NULL); + if (GetFileTime (hFile, NULL, &ftLastAccessTime, NULL) == 0) bTimeStampValid = FALSE; else @@ -3430,6 +3444,13 @@ BOOL QueryFreeSpace (HWND hwndDlg, HWND hwndTextBox, BOOL display, LONGLONG *pFr else { LARGE_INTEGER lDiskFree; + // if the file pointed by szFileName already exists, we must add its size to the free space since it will be overwritten durig the volume creation + __int64 lFileSize = GetFileSize64(szFileName); + if (lFileSize != -1) + { + free.QuadPart += lFileSize; + } + lDiskFree.QuadPart = free.QuadPart; if (pFreeSpaceValue) @@ -3673,24 +3694,44 @@ static void UpdateClusterSizeList (HWND hwndDlg, int fsType) SendMessage (GetDlgItem (hwndDlg, IDC_CLUSTERSIZE), CB_RESETCONTENT, 0, 0); AddComboPair (GetDlgItem (hwndDlg, IDC_CLUSTERSIZE), GetString ("DEFAULT"), 0); - for (int i = 1; i <= 128; i *= 2) + for (int i = 1; i <= 65536; i *= 2) { wstringstream s; DWORD size = GetFormatSectorSize() * i; - if (size > TC_MAX_FAT_CLUSTER_SIZE) + /* cluster size makes sense only when there is a filesystem */ + if (fsType == FILESYS_NONE) + break; + + /* FAT supports at maximum 64K when sector size is 512, and at maximum 256K when sector size is larger than 512 */ + /* For now we set maximum cluster size to 64K in all cases for compatibility with exiting FAT code in VeraCrypt */ + if ((fsType == FILESYS_FAT) && (size > 64*BYTES_PER_KB)) break; /* ReFS supports only 4KiB and 64KiB clusters */ if ((fsType == FILESYS_REFS) && (size != 4*BYTES_PER_KB) && (size != 64*BYTES_PER_KB)) continue; + /* NTFS supports at maximum 2M cluster */ + if ((fsType == FILESYS_NTFS) && (size > 2*BYTES_PER_MB)) + break; + + /* exFAT supports at maximum 32M cluster */ + if ((fsType == FILESYS_EXFAT) && (size > 32*BYTES_PER_MB)) + break; + if (size == 512) - s << L"0.5"; - else + s << L"0.5 " << GetString ("KB"); + else if (size < BYTES_PER_MB) + { s << size / BYTES_PER_KB; - - s << L" " << GetString ("KB"); + s << L" " << GetString ("KB"); + } + else + { + s << size / BYTES_PER_MB; + s << L" " << GetString ("MB"); + } AddComboPair (GetDlgItem (hwndDlg, IDC_CLUSTERSIZE), s.str().c_str(), i); } @@ -4136,7 +4177,7 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa for (ea = EAGetFirst (); ea != 0; ea = EAGetNext (ea)) { if (EAIsFormatEnabled (ea) && (!SysEncInEffect () || bSystemIsGPT || EAIsMbrSysEncEnabled (ea))) - AddComboPair (GetDlgItem (hwndDlg, IDC_COMBO_BOX), EAGetName (buf, ea, 1), ea); + AddComboPair (GetDlgItem (hwndDlg, IDC_COMBO_BOX), EAGetName (buf, ARRAYSIZE(buf),ea, 1), ea); } SelectAlgo (GetDlgItem (hwndDlg, IDC_COMBO_BOX), &nVolumeEA); @@ -4154,8 +4195,7 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa for (hid = FIRST_PRF_ID; hid <= LAST_PRF_ID; hid++) { - // For now, we keep RIPEMD160 for system encryption - if (((hid == RIPEMD160) || !HashIsDeprecated (hid)) && (bSystemIsGPT || HashForSystemEncryption (hid))) + if ((!HashIsDeprecated (hid)) && (bSystemIsGPT || HashForSystemEncryption (hid))) AddComboPair (GetDlgItem (hwndDlg, IDC_COMBO_BOX_HASH_ALGO), HashGetName(hid), hid); } } @@ -4300,6 +4340,8 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa /* make autodetection the default */ SendMessage (hComboBox, CB_SETCURSEL, 0, 0); + hPasswordInputField = GetDlgItem (hwndDlg, IDC_PASSWORD_DIRECT); + hVerifyPasswordInputField = NULL; ToNormalPwdField (hwndDlg, IDC_PASSWORD_DIRECT); SetPassword (hwndDlg, IDC_PASSWORD_DIRECT, szRawPassword); @@ -4391,7 +4433,8 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa SetCheckBox (hwndDlg, IDC_PIM_ENABLE, PimEnable); SetCheckBox (hwndDlg, IDC_KEYFILES_ENABLE, KeyFilesEnable && !SysEncInEffect()); - EnableWindow (GetDlgItem (hwndDlg, IDC_KEY_FILES), KeyFilesEnable); + EnableWindow (GetDlgItem (hwndDlg, IDC_KEY_FILES), KeyFilesEnable && !SysEncInEffect()); + EnableWindow (GetDlgItem (hwndDlg, IDC_KEYFILES_ENABLE), !SysEncInEffect()); SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), str); @@ -4432,9 +4475,11 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa } SetFocus (GetDlgItem (hwndDlg, IDC_PIM)); - + #ifndef WOLFCRYPT_BACKEND SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString (SysEncInEffect () && hash_algo != SHA512 && hash_algo != WHIRLPOOL? "PIM_SYSENC_HELP" : "PIM_HELP")); - + #else + SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString (SysEncInEffect () && hash_algo != SHA512? "PIM_SYSENC_HELP" : "PIM_HELP")); + #endif ToHyperlink (hwndDlg, IDC_LINK_PIM_INFO); if (CreatingHiddenSysVol()) @@ -4546,6 +4591,7 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), GetString ("NEXT")); SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_PREV), GetString ("PREV")); SetWindowTextW (GetDlgItem (hwndDlg, IDT_RESCUE_DISK_INFO), bSystemIsGPT? GetString ("RESCUE_DISK_EFI_INFO"): GetString ("RESCUE_DISK_INFO")); + SetCheckBox (hwndDlg, IDC_SKIP_RESCUE_VERIFICATION, bDontVerifyRescueDisk); SetDlgItemText (hwndDlg, IDC_RESCUE_DISK_ISO_PATH, szRescueDiskISO); EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), (GetWindowTextLength (GetDlgItem (hwndDlg, IDC_RESCUE_DISK_ISO_PATH)) > 1)); EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_PREV), TRUE); @@ -4929,6 +4975,18 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa else SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_TITLE), GetString ("FORMAT_TITLE")); + /* Fill the format type combobox */ + SendMessage (GetDlgItem (hwndDlg, IDC_FORMAT_TYPE), CB_RESETCONTENT, 0, 0); + EnableWindow (GetDlgItem (hwndDlg, IDC_FORMAT_TYPE), TRUE); + + AddComboPair (GetDlgItem (hwndDlg, IDC_FORMAT_TYPE), GetString("FULL_FORMAT"), FORMAT_TYPE_FULL); + AddComboPair (GetDlgItem (hwndDlg, IDC_FORMAT_TYPE), GetString("IDC_QUICKFORMAT"), FORMAT_TYPE_QUICK); + if (!bDevice) // Fast Create only makes sens for file containers + AddComboPair (GetDlgItem (hwndDlg, IDC_FORMAT_TYPE), GetString("FAST_CREATE"), FORMAT_TYPE_FAST); + SendMessage (GetDlgItem (hwndDlg, IDC_FORMAT_TYPE), CB_SETCURSEL, 0, 0); + + formatType = FORMAT_TYPE_FULL; + /* Quick/Dynamic */ if (bHiddenVol) @@ -4940,8 +4998,18 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa SetCheckBox (hwndDlg, SPARSE_FILE, FALSE); EnableWindow (GetDlgItem (hwndDlg, SPARSE_FILE), FALSE); - SetCheckBox (hwndDlg, IDC_QUICKFORMAT, quickFormat); - EnableWindow (GetDlgItem (hwndDlg, IDC_QUICKFORMAT), bHiddenVolHost); + if (quickFormat) + { + formatType = FORMAT_TYPE_QUICK; + SelectAlgo (GetDlgItem (hwndDlg, IDC_FORMAT_TYPE), (int *) &formatType); + } + else if (!bDevice && fastCreateFile) + { + formatType = FORMAT_TYPE_FAST; + quickFormat = TRUE; + SelectAlgo (GetDlgItem (hwndDlg, IDC_FORMAT_TYPE), (int *) &formatType); + } + EnableWindow (GetDlgItem (hwndDlg, IDC_FORMAT_TYPE), bHiddenVolHost); } else { @@ -4951,7 +5019,7 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa bSparseFileSwitch = FALSE; SetCheckBox (hwndDlg, SPARSE_FILE, FALSE); EnableWindow (GetDlgItem (hwndDlg, SPARSE_FILE), FALSE); - EnableWindow (GetDlgItem (hwndDlg, IDC_QUICKFORMAT), TRUE); + EnableWindow (GetDlgItem (hwndDlg, IDC_FORMAT_TYPE), TRUE); } else { @@ -4972,8 +5040,15 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa dynamicFormat = FALSE; SetCheckBox (hwndDlg, SPARSE_FILE, FALSE); } + + if (fastCreateFile) + { + formatType = FORMAT_TYPE_FAST; + quickFormat = TRUE; + SelectAlgo (GetDlgItem (hwndDlg, IDC_FORMAT_TYPE), (int *) &formatType); + } EnableWindow (GetDlgItem (hwndDlg, SPARSE_FILE), bSparseFileSwitch); - EnableWindow (GetDlgItem (hwndDlg, IDC_QUICKFORMAT), TRUE); + EnableWindow (GetDlgItem (hwndDlg, IDC_FORMAT_TYPE), TRUE); } } @@ -5011,7 +5086,7 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa } //exFAT support added starting from Vista SP1 - if (IsOSVersionAtLeast (WIN_VISTA, 1) && dataAreaSize >= TC_MIN_EXFAT_FS_SIZE && dataAreaSize <= TC_MAX_EXFAT_FS_SIZE) + if (dataAreaSize >= TC_MIN_EXFAT_FS_SIZE && dataAreaSize <= TC_MAX_EXFAT_FS_SIZE) { AddComboPair (GetDlgItem (hwndDlg, IDC_FILESYS), L"exFAT", FILESYS_EXFAT); bEXFATallowed = TRUE; @@ -5564,7 +5639,7 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa int nIndex = (int) SendMessage (GetDlgItem (hCurPage, IDC_COMBO_BOX), CB_GETCURSEL, 0, 0); nIndex = (int) SendMessage (GetDlgItem (hCurPage, IDC_COMBO_BOX), CB_GETITEMDATA, nIndex, 0); - EAGetName (name, nIndex, 0); + EAGetName (name, ARRAYSIZE(name),nIndex, 0); if (wcscmp (name, L"AES") == 0) Applink ("aes"); @@ -5572,8 +5647,6 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa Applink ("serpent"); else if (wcscmp (name, L"Twofish") == 0) Applink ("twofish"); - else if (wcscmp (name, L"GOST89") == 0) - Applink ("gost89"); else if (wcscmp (name, L"Kuznyechik") == 0) Applink ("kuznyechik"); else if (wcscmp (name, L"Camellia") == 0) @@ -5598,8 +5671,24 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa if (hw == CBN_EDITCHANGE && nCurPageNo == VOLUME_LOCATION_PAGE) { + BOOL bValidEntry = (GetWindowTextLength (GetDlgItem (hCurPage, IDC_COMBO_BOX)) > 0)? TRUE : FALSE; + + if (bValidEntry && !bDevice) + { + /* check that the entered path is not for an existing directory */ + WCHAR szEnteredFilePath[TC_MAX_PATH + 1] = {0}; + GetWindowTextW (GetDlgItem (hCurPage, IDC_COMBO_BOX), szEnteredFilePath, ARRAYSIZE (szEnteredFilePath)); + RelativePath2Absolute (szEnteredFilePath); + + DWORD dwAttr = GetFileAttributes (szEnteredFilePath); + if ((dwAttr != INVALID_FILE_ATTRIBUTES) && (dwAttr & FILE_ATTRIBUTE_DIRECTORY)) + { + /* this is a directory. Consider it as invalid */ + bValidEntry = FALSE; + } + } EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), - GetWindowTextLength (GetDlgItem (hCurPage, IDC_COMBO_BOX)) > 0); + bValidEntry); bDeviceTransformModeChoiceMade = FALSE; bInPlaceEncNonSys = FALSE; @@ -5816,7 +5905,7 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa { // Select file - if (BrowseFiles (hwndDlg, "OPEN_TITLE", szFileName, bHistory, !bHiddenVolDirect, NULL) == FALSE) + if (BrowseFiles (hwndDlg, "OPEN_TITLE", szFileName, bHistory, !bHiddenVolDirect) == FALSE) return 1; AddComboItem (GetDlgItem (hwndDlg, IDC_COMBO_BOX), szFileName, bHistory); @@ -5913,29 +6002,50 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa } - if (lw == IDC_QUICKFORMAT) + if (lw == IDC_FORMAT_TYPE && hw == CBN_SELCHANGE) { - if (IsButtonChecked (GetDlgItem (hCurPage, IDC_QUICKFORMAT))) + formatType = (int) SendMessage (GetDlgItem (hCurPage, IDC_FORMAT_TYPE), CB_GETITEMDATA, + SendMessage (GetDlgItem (hCurPage, IDC_FORMAT_TYPE), CB_GETCURSEL, 0, 0) , 0); + + if (formatType == FORMAT_TYPE_QUICK) { if (AskWarnYesNo("WARN_QUICK_FORMAT", MainDlg) == IDNO) - SetCheckBox (hwndDlg, IDC_QUICKFORMAT, FALSE); + { + formatType = FORMAT_TYPE_FULL; + SelectAlgo(GetDlgItem (hCurPage, IDC_FORMAT_TYPE), (int *) &formatType); + } } - else if (IsButtonChecked (GetDlgItem (hCurPage, SPARSE_FILE))) + else if (formatType == FORMAT_TYPE_FAST) { - /* sparse file require quick format */ - SetCheckBox (hwndDlg, SPARSE_FILE, FALSE); + if (AskWarnYesNo("WARN_FAST_CREATE", MainDlg) == IDNO) + { + formatType = FORMAT_TYPE_FULL; + SelectAlgo(GetDlgItem (hCurPage, IDC_FORMAT_TYPE), (int *) &formatType); + } } + return 1; } - if (lw == SPARSE_FILE && IsButtonChecked (GetDlgItem (hCurPage, SPARSE_FILE))) + if (lw == SPARSE_FILE) { - if (AskWarnYesNo("CONFIRM_SPARSE_FILE", MainDlg) == IDNO) - SetCheckBox (hwndDlg, SPARSE_FILE, FALSE); - else if (!IsButtonChecked (GetDlgItem (hCurPage, IDC_QUICKFORMAT)) && IsWindowEnabled (GetDlgItem (hCurPage, IDC_QUICKFORMAT))) + if (IsButtonChecked (GetDlgItem (hCurPage, SPARSE_FILE))) + { + if (AskWarnYesNo("CONFIRM_SPARSE_FILE", MainDlg) == IDNO) + SetCheckBox (hwndDlg, SPARSE_FILE, FALSE); + else + { + /* sparse file require quick format */ + formatType = FORMAT_TYPE_QUICK; + SelectAlgo(GetDlgItem (hCurPage, IDC_FORMAT_TYPE), (int *) &formatType); + EnableWindow(GetDlgItem (hCurPage, IDC_FORMAT_TYPE), FALSE); + } + } + else { - /* sparse file require quick format */ - SetCheckBox (hwndDlg, IDC_QUICKFORMAT, TRUE); + EnableWindow(GetDlgItem (hCurPage, IDC_FORMAT_TYPE), TRUE); + formatType = FORMAT_TYPE_FULL; + SelectAlgo(GetDlgItem (hCurPage, IDC_FORMAT_TYPE), (int *) &formatType); } return 1; } @@ -5986,7 +6096,7 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa { wchar_t tmpszRescueDiskISO [TC_MAX_PATH+1]; - if (!BrowseFiles (hwndDlg, "OPEN_TITLE", tmpszRescueDiskISO, FALSE, TRUE, NULL)) + if (!BrowseFiles (hwndDlg, "OPEN_TITLE", tmpszRescueDiskISO, FALSE, TRUE)) return 1; StringCbCopyW (szRescueDiskISO, sizeof(szRescueDiskISO), tmpszRescueDiskISO); @@ -6128,6 +6238,12 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa ExtractCommandLine (hwndDlg, (wchar_t *) lParam); + if (EnableMemoryProtection) + { + /* Protect this process memory from being accessed by non-admin users */ + ActivateMemoryProtection (); + } + if (ComServerMode) { InitDialog (hwndDlg); @@ -6140,6 +6256,8 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa exit (0); } + fastCreateFile = CmdFastCreateFile; + if (DirectCreationMode) { wchar_t root[TC_MAX_PATH]; @@ -6151,7 +6269,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa showKeys = FALSE; bGuiMode = FALSE; - if (CmdVolumePassword.Length == 0) + if (CmdVolumePassword.Length == 0 && !FirstCmdKeyFile) AbortProcess ("ERR_PASSWORD_MISSING"); if (CmdVolumeFileSize == 0) @@ -6242,7 +6360,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa } else { - if (!dynamicFormat && (nVolumeSize > free.QuadPart)) + if (!dynamicFormat && !bDontCheckFileContainerSize && (nVolumeSize > free.QuadPart)) { AbortProcess ("ERR_CONTAINER_SIZE_TOO_BIG"); } @@ -6290,13 +6408,6 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa } } - /* Verify that the volume would not be too large for the operating system */ - if (!IsOSAtLeast (WIN_VISTA) - && nVolumeSize > 2 * BYTES_PER_TB) - { - AbortProcess ("VOLUME_TOO_LARGE_FOR_WINXP"); - } - if (volumePassword.Length > 0) { // Check password length (check also done for outer volume which is not the case in TrueCrypt). @@ -6306,6 +6417,11 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa } } + if (!KeyFilesApply (hwndDlg, &volumePassword, FirstCmdKeyFile, NULL)) + { + exit (1); + } + volTransformThreadFunction (hwndDlg); exit (bOperationSuccess? 0 : 1); @@ -6317,19 +6433,24 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa else StringCbCatW (szRescueDiskISO, sizeof(szRescueDiskISO), L"\\VeraCrypt Rescue Disk.iso"); - if (IsOSAtLeast (WIN_VISTA)) - { - // Availability of in-place encryption (which is pre-selected by default whenever - // possible) makes partition-hosted volume creation safer. - bWarnDeviceFormatAdvanced = FALSE; - } + // Availability of in-place encryption (which is pre-selected by default whenever + // possible) makes partition-hosted volume creation safer. + bWarnDeviceFormatAdvanced = FALSE; #ifdef _DEBUG // For faster testing - strcpy (szVerify, "q"); - strcpy (szRawPassword, "q"); + StringCchCopyA (szVerify, ARRAYSIZE(szVerify), "q"); + StringCchCopyA (szRawPassword, ARRAYSIZE(szRawPassword), "q"); #endif + PasswordEditDropTarget* pTarget = new PasswordEditDropTarget (); + if (pTarget->Register (hwndDlg)) + { + SetWindowLongPtr (hwndDlg, DWLP_USER, (LONG_PTR) pTarget); + } + else + delete pTarget; + PostMessage (hwndDlg, TC_APPMSG_PERFORM_POST_WMINIT_TASKS, 0, 0); } return 0; @@ -6585,7 +6706,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa { // Keyboard layout is not standard US - WipePasswordsAndKeyfiles (); + WipePasswordsAndKeyfiles (true); SetPassword (hCurPage, IDC_PASSWORD, szRawPassword); SetPassword (hCurPage, IDC_VERIFY, szVerify); @@ -6829,7 +6950,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa { // Format has been aborted (did not finish) - EnableWindow (GetDlgItem (hCurPage, IDC_QUICKFORMAT), !(bHiddenVol && !bHiddenVolHost)); + EnableWindow (GetDlgItem (hCurPage, IDC_FORMAT_TYPE), !(bHiddenVol && !bHiddenVolHost)); EnableWindow (GetDlgItem (hCurPage, SPARSE_FILE), (bSparseFileSwitch) && !(bHiddenVol && !bHiddenVolHost)); EnableWindow (GetDlgItem (hCurPage, IDC_FILESYS), TRUE); EnableWindow (GetDlgItem (hCurPage, IDC_CLUSTERSIZE), TRUE); @@ -7091,21 +7212,6 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa if (AskWarnYesNoString ((wstring (GetString ("SYSDRIVE_NON_STANDARD_PARTITIONS")) + L"\n\n" + GetString ("ASK_ENCRYPT_PARTITION_INSTEAD_OF_DRIVE")).c_str(), MainDlg) == IDYES) bWholeSysDrive = FALSE; } - - if (!IsOSAtLeast (WIN_VISTA) && bWholeSysDrive) - { - if (BootEncObj->SystemDriveContainsExtendedPartition()) - { - Error ("WDE_UNSUPPORTED_FOR_EXTENDED_PARTITIONS", MainDlg); - - if (AskYesNo ("ASK_ENCRYPT_PARTITION_INSTEAD_OF_DRIVE", MainDlg) == IDNO) - return 1; - - bWholeSysDrive = FALSE; - } - else - Warning ("WDE_EXTENDED_PARTITIONS_WARNING", hwndDlg); - } } if (!bWholeSysDrive && BootEncObj->SystemPartitionCoversWholeDrive()) @@ -7163,8 +7269,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa if (bHiddenOS) { - if (IsOSAtLeast (WIN_7) - && BootEncObj->GetSystemDriveConfiguration().ExtraBootPartitionPresent + if (BootEncObj->GetSystemDriveConfiguration().ExtraBootPartitionPresent && AskWarnYesNo ("CONFIRM_HIDDEN_OS_EXTRA_BOOT_PARTITION", hwndDlg) == IDNO) { TextInfoDialogBox (TC_TBXID_EXTRA_BOOT_PARTITION_REMOVAL_INSTRUCTIONS); @@ -7260,7 +7365,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa else { // Either a standard Windows boot manager or no boot manager - wcscpy_s (SysEncMultiBootCfgOutcome, sizeof(SysEncMultiBootCfgOutcome) / 2, GetString ("WINDOWS_BOOT_LOADER_HINTS")); + StringCchCopyW (SysEncMultiBootCfgOutcome, sizeof(SysEncMultiBootCfgOutcome) / 2, GetString ("WINDOWS_BOOT_LOADER_HINTS")); } } @@ -7533,13 +7638,6 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa } } - /* Verify that the volume would not be too large for the operating system */ - - if (!IsOSAtLeast (WIN_VISTA) - && nUIVolumeSize * nMultiplier > 2 * BYTES_PER_TB) - { - Warning ("VOLUME_TOO_LARGE_FOR_WINXP", hwndDlg); - } } if (bHiddenVol && !bHiddenVolHost) // If it's a hidden volume @@ -7625,6 +7723,18 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa nNewPageNo = PIM_PAGE; volumePim = 0; + if (!CreatingHiddenSysVol() && bHiddenVol && !bHiddenVolHost) + { + if ( (volumePim == outerVolumePim) + && (volumePassword.Length == outerVolumePassword.Length) + && (0 == memcmp (volumePassword.Text, outerVolumePassword.Text, volumePassword.Length)) + ) + { + Warning ("HIDDEN_CREDS_SAME_AS_OUTER", hwndDlg); + return 1; + } + } + if (SysEncInEffect ()) { nNewPageNo = SYSENC_COLLECTING_RANDOM_DATA_PAGE - 1; // Skip irrelevant pages @@ -7655,6 +7765,18 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa return 1; } + if (!CreatingHiddenSysVol() && bHiddenVol && !bHiddenVolHost) + { + if ( (volumePim == outerVolumePim) + && (volumePassword.Length == outerVolumePassword.Length) + && (0 == memcmp (volumePassword.Text, outerVolumePassword.Text, volumePassword.Length)) + ) + { + Warning ("HIDDEN_CREDS_SAME_AS_OUTER", hwndDlg); + return 1; + } + } + if (volumePassword.Length > 0) { // Password character encoding @@ -7822,8 +7944,12 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa bHiddenVolHost = FALSE; bHiddenVolFinished = FALSE; + // save the outer volume password to use it for comparison with hidden volume one + memcpy (&outerVolumePassword, &volumePassword, sizeof (volumePassword)); + outerVolumePim = volumePim; + // Clear the outer volume password - WipePasswordsAndKeyfiles (); + WipePasswordsAndKeyfiles (false); RestoreDefaultKeyFilesParam (); @@ -7912,7 +8038,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa // Check that it is not a hidden or legacy volume - if (MountVolume (hwndDlg, driveNo, szFileName, &volumePassword, hash_algo, volumePim, FALSE, FALSE, FALSE, TRUE, &mountOptions, FALSE, TRUE) < 1) + if (MountVolume (hwndDlg, driveNo, szFileName, &volumePassword, hash_algo, volumePim, FALSE, FALSE, TRUE, &mountOptions, FALSE, TRUE) < 1) { NormalCursor(); return 1; @@ -7954,7 +8080,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa mountOptions.UseBackupHeader = TRUE; // This must be TRUE at this point (we won't be using the regular header, which will be lost soon after the decryption process starts) - if (MountVolume (hwndDlg, driveNo, szFileName, &volumePassword, hash_algo, volumePim, FALSE, FALSE, FALSE, TRUE, &mountOptions, FALSE, TRUE) < 1) + if (MountVolume (hwndDlg, driveNo, szFileName, &volumePassword, hash_algo, volumePim, FALSE, FALSE, TRUE, &mountOptions, FALSE, TRUE) < 1) { NormalCursor(); return 1; @@ -8369,6 +8495,7 @@ retryCDDriveCheck: else if (nCurPageNo == FORMAT_PAGE) { /* Format start (the 'Next' button has been clicked on the Format page) */ + static BOOL g_bFastStartupCheckDone = FALSE; if (bVolTransformThreadRunning || bVolTransformThreadToRun) return 1; @@ -8377,13 +8504,33 @@ retryCDDriveCheck: bVolTransformThreadToRun = TRUE; + // check if Fast Startup is enabled and if yes then offer to disable it + if (!g_bFastStartupCheckDone) + { + BOOL bHibernateEnabled = FALSE, bHiberbootEnabled = FALSE; + if (GetHibernateStatus (bHibernateEnabled, bHiberbootEnabled) && bHiberbootEnabled) + { + if (AskWarnYesNo ("CONFIRM_DISABLE_FAST_STARTUP", hwndDlg) == IDYES) + { + if (!IsAdmin () && IsUacSupported ()) + UacWriteLocalMachineRegistryDword (hwndDlg, L"SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Power", L"HiberbootEnabled", 0); + else + WriteLocalMachineRegistryDword (L"SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Power", L"HiberbootEnabled", 0); + } + } + g_bFastStartupCheckDone = true; + } + fileSystem = (int) SendMessage (GetDlgItem (hCurPage, IDC_FILESYS), CB_GETITEMDATA, SendMessage (GetDlgItem (hCurPage, IDC_FILESYS), CB_GETCURSEL, 0, 0) , 0); clusterSize = (int) SendMessage (GetDlgItem (hCurPage, IDC_CLUSTERSIZE), CB_GETITEMDATA, SendMessage (GetDlgItem (hCurPage, IDC_CLUSTERSIZE), CB_GETCURSEL, 0, 0) , 0); - quickFormat = IsButtonChecked (GetDlgItem (hCurPage, IDC_QUICKFORMAT)); + formatType = (int) SendMessage (GetDlgItem (hCurPage, IDC_FORMAT_TYPE), CB_GETITEMDATA, + SendMessage (GetDlgItem (hCurPage, IDC_FORMAT_TYPE), CB_GETCURSEL, 0, 0) , 0); + quickFormat = (formatType == FORMAT_TYPE_QUICK) || (formatType == FORMAT_TYPE_FAST); + fastCreateFile = (formatType == FORMAT_TYPE_FAST); dynamicFormat = IsButtonChecked (GetDlgItem (hCurPage, SPARSE_FILE)); if (!dynamicFormat && !bDevice && !(bHiddenVol && !bHiddenVolHost) && (nVolumeSize > (ULONGLONG) nAvailableFreeSpace)) @@ -8453,13 +8600,7 @@ retryCDDriveCheck: if (fileSystem == FILESYS_NTFS || fileSystem == FILESYS_EXFAT) // The file system may have been changed in the previous block { - if (nCurrentOS == WIN_2000) - { - Error("HIDDEN_VOL_HOST_UNSUPPORTED_FILESYS_WIN2000", hwndDlg); - bVolTransformThreadToRun = FALSE; - return 1; - } - else if ((fileSystem == FILESYS_NTFS) && (GetVolumeDataAreaSize (FALSE, nVolumeSize) <= TC_MAX_FAT_SECTOR_COUNT * GetFormatSectorSize()) + if ((fileSystem == FILESYS_NTFS) && (GetVolumeDataAreaSize (FALSE, nVolumeSize) <= TC_MAX_FAT_SECTOR_COUNT * GetFormatSectorSize()) && AskYesNo("HIDDEN_VOL_HOST_NTFS_ASK", hwndDlg) == IDNO) { bVolTransformThreadToRun = FALSE; @@ -8488,7 +8629,7 @@ retryCDDriveCheck: EnableWindow (GetDlgItem (hwndDlg, IDC_NEXT), FALSE); EnableWindow (GetDlgItem (hwndDlg, IDHELP), FALSE); EnableWindow (GetDlgItem (hwndDlg, IDCANCEL), FALSE); - EnableWindow (GetDlgItem (hCurPage, IDC_QUICKFORMAT), FALSE); + EnableWindow (GetDlgItem (hCurPage, IDC_FORMAT_TYPE), FALSE); EnableWindow (GetDlgItem (hCurPage, SPARSE_FILE), FALSE); EnableWindow (GetDlgItem (hCurPage, IDC_CLUSTERSIZE), FALSE); EnableWindow (GetDlgItem (hCurPage, IDC_FILESYS), FALSE); @@ -8553,7 +8694,7 @@ retryCDDriveCheck: SetWindowTextW (GetDlgItem (MainDlg, IDCANCEL), GetString ("CANCEL")); bHiddenVolFinished = FALSE; - WipePasswordsAndKeyfiles (); + WipePasswordsAndKeyfiles (true); return 1; } @@ -8655,8 +8796,12 @@ retryCDDriveCheck: nNewPageNo = HIDDEN_VOL_HOST_PRE_CIPHER_PAGE; + // save the outer volume password to use it for comparison with hidden volume one + memcpy (&outerVolumePassword, &volumePassword, sizeof (volumePassword)); + outerVolumePim = volumePim; + // Clear the outer volume password - WipePasswordsAndKeyfiles (); + WipePasswordsAndKeyfiles (false); EnableWindow (GetDlgItem (MainDlg, IDC_NEXT), TRUE); NormalCursor (); @@ -8927,6 +9072,22 @@ ovf_end: case WM_CLOSE: PostMessage (hwndDlg, TC_APPMSG_FORMAT_USER_QUIT, 0, 0); return 1; + + case WM_NCDESTROY: + { + hPasswordInputField = NULL; + hVerifyPasswordInputField = NULL; + + /* unregister drap-n-drop support */ + PasswordEditDropTarget* pTarget = (PasswordEditDropTarget*) GetWindowLongPtr (hwndDlg, DWLP_USER); + if (pTarget) + { + SetWindowLongPtr (hwndDlg, DWLP_USER, (LONG_PTR) 0); + pTarget->Revoke (); + pTarget->Release(); + } + } + return 0; } return 0; @@ -8981,6 +9142,10 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine) OptionForce, OptionNoSizeCheck, OptionQuickFormat, + OptionFastCreateFile, + OptionEnableMemoryProtection, + OptionKeyfile, + OptionSecureDesktop, }; argument args[]= @@ -9003,6 +9168,10 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine) { OptionForce, L"/force", NULL, FALSE }, { OptionNoSizeCheck, L"/nosizecheck", NULL, FALSE }, { OptionQuickFormat, L"/quick", NULL, FALSE }, + { OptionFastCreateFile, L"/fastcreatefile", NULL, FALSE }, + { OptionEnableMemoryProtection, L"/protectMemory", NULL, FALSE }, + { OptionKeyfile, L"/keyfile", L"/k", FALSE }, + { OptionSecureDesktop, L"/secureDesktop", NULL, FALSE }, // Internal { CommandResumeSysEncLogOn, L"/acsysenc", L"/a", TRUE }, @@ -9071,7 +9240,7 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine) CmdVolumeFilesystem = FILESYS_FAT; else if (_wcsicmp(szTmp, L"NTFS") == 0) CmdVolumeFilesystem = FILESYS_NTFS; - else if (IsOSVersionAtLeast (WIN_VISTA, 1) && _wcsicmp(szTmp, L"EXFAT") == 0) + else if (_wcsicmp(szTmp, L"EXFAT") == 0) CmdVolumeFilesystem = FILESYS_EXFAT; else if (IsOSVersionAtLeast (WIN_10, 0) && _wcsicmp(szTmp, L"ReFS") == 0) CmdVolumeFilesystem = FILESYS_REFS; @@ -9112,8 +9281,8 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine) CmdVolumePkcs5 = SHA512; else if (_wcsicmp(szTmp, L"sha256") == 0) CmdVolumePkcs5 = SHA256; - else if (_wcsicmp(szTmp, L"ripemd160") == 0) - CmdVolumePkcs5 = RIPEMD160; + else if ((_wcsicmp(szTmp, L"blake2s") == 0) || (_wcsicmp(szTmp, L"blake2s-256") == 0)) + CmdVolumePkcs5 = BLAKE2S; else { /* match using internal hash names */ @@ -9359,6 +9528,14 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine) CmdQuickFormat = TRUE; break; + case OptionFastCreateFile: + CmdFastCreateFile = TRUE; + break; + + case OptionEnableMemoryProtection: + EnableMemoryProtection = TRUE; + break; + case OptionHistory: { wchar_t szTmp[8] = {0}; @@ -9392,7 +9569,7 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine) case OptionTokenPin: { - wchar_t szTmp[SecurityToken::MaxPasswordLength + 1] = {0}; + wchar_t szTmp[SecurityToken::MaxPasswordLength + 1] = {0}; // TODO Use Token if (GetArgumentValue (lpszCommandLineArgs, &i, nNoCommandLineArgs, szTmp, ARRAYSIZE (szTmp)) == HAS_ARGUMENT) { if (0 == WideCharToMultiByte (CP_UTF8, 0, szTmp, -1, CmdTokenPin, TC_MAX_PATH, nullptr, nullptr)) @@ -9413,6 +9590,46 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine) } break; + case OptionKeyfile: + { + wchar_t tmpPath [2 * TC_MAX_PATH] = {0}; + if (HAS_ARGUMENT == GetArgumentValue (lpszCommandLineArgs, &i, + nNoCommandLineArgs, tmpPath, ARRAYSIZE (tmpPath))) + { + KeyFile *kf; + RelativePath2Absolute (tmpPath); + kf = (KeyFile *) malloc (sizeof (KeyFile)); + if (kf) + { + StringCchCopyW (kf->FileName, ARRAYSIZE(kf->FileName), tmpPath); + FirstCmdKeyFile = KeyFileAdd (FirstCmdKeyFile, kf); + } + } + else + AbortProcess ("COMMAND_LINE_ERROR"); + } + + break; + + case OptionSecureDesktop: + { + wchar_t szTmp[16] = {0}; + bCmdUseSecureDesktop = TRUE; + bCmdUseSecureDesktopValid = TRUE; + + if (HAS_ARGUMENT == GetArgumentValue (lpszCommandLineArgs, &i, nNoCommandLineArgs, + szTmp, ARRAYSIZE (szTmp))) + { + if (!_wcsicmp(szTmp,L"n") || !_wcsicmp(szTmp,L"no")) + bCmdUseSecureDesktop = FALSE; + else if (!_wcsicmp(szTmp,L"y") || !_wcsicmp(szTmp,L"yes")) + bCmdUseSecureDesktop = TRUE; + else + AbortProcess ("COMMAND_LINE_ERROR"); + } + } + break; + default: DialogBoxParamW (hInst, MAKEINTRESOURCEW (IDD_COMMANDHELP_DLG), hwndDlg, (DLGPROC) CommandHelpDlgProc, (LPARAM) &as); @@ -9573,23 +9790,24 @@ int AnalyzeHiddenVolumeHost (HWND hwndDlg, int *driveNo, __int64 hiddenVolHostSi // The map will be scanned to determine the size of the uninterrupted block of free // space (provided there is any) whose end is aligned with the end of the volume. // The value will then be used to determine the maximum possible size of the hidden volume. - - return ScanVolClusterBitmap (hwndDlg, - driveNo, - hiddenVolHostSize / *realClusterSize, - pnbrFreeClusters); + if (*realClusterSize > 0) + { + return ScanVolClusterBitmap (hwndDlg, + driveNo, + hiddenVolHostSize / *realClusterSize, + pnbrFreeClusters); + } + else + { + // should never happen + return -1; + } } else if (!wcsncmp (szFileSystemNameBuffer, L"NTFS", 4) || !_wcsnicmp (szFileSystemNameBuffer, L"exFAT", 5)) { // NTFS bool bIsNtfs = (0 == wcsncmp (szFileSystemNameBuffer, L"NTFS", 4)); - if (nCurrentOS == WIN_2000) - { - Error("HIDDEN_VOL_HOST_UNSUPPORTED_FILESYS_WIN2000", hwndDlg); - return 0; - } - if (bIsNtfs && bHiddenVolDirect && GetVolumeDataAreaSize (FALSE, hiddenVolHostSize) <= TC_MAX_FAT_SECTOR_COUNT * GetFormatSectorSize()) Info ("HIDDEN_VOL_HOST_NTFS", hwndDlg); @@ -9620,7 +9838,7 @@ int AnalyzeHiddenVolumeHost (HWND hwndDlg, int *driveNo, __int64 hiddenVolHostSi { // Unsupported file system - Error ((nCurrentOS == WIN_2000) ? "HIDDEN_VOL_HOST_UNSUPPORTED_FILESYS_WIN2000" : "HIDDEN_VOL_HOST_UNSUPPORTED_FILESYS", hwndDlg); + Error ("HIDDEN_VOL_HOST_UNSUPPORTED_FILESYS", hwndDlg); return 0; } @@ -9655,7 +9873,7 @@ int MountHiddenVolHost (HWND hwndDlg, wchar_t *volumePath, int *driveNo, Passwor mountOptions.PartitionInInactiveSysEncScope = FALSE; mountOptions.UseBackupHeader = FALSE; - if (MountVolume (hwndDlg, *driveNo, volumePath, password, pkcs5_prf, pim, FALSE, FALSE, FALSE, TRUE, &mountOptions, FALSE, TRUE) < 1) + if (MountVolume (hwndDlg, *driveNo, volumePath, password, pkcs5_prf, pim, FALSE, FALSE, TRUE, &mountOptions, FALSE, TRUE) < 1) { *driveNo = -3; return ERR_VOL_MOUNT_FAILED; @@ -10347,9 +10565,11 @@ int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpsz atexit (localcleanup); VirtualLock (&volumePassword, sizeof(volumePassword)); + VirtualLock (&outerVolumePassword, sizeof(outerVolumePassword)); VirtualLock (szVerify, sizeof(szVerify)); VirtualLock (szRawPassword, sizeof(szRawPassword)); VirtualLock (&volumePim, sizeof(volumePim)); + VirtualLock (&outerVolumePim, sizeof(outerVolumePim)); VirtualLock (&CmdVolumePassword, sizeof (CmdVolumePassword)); VirtualLock (MasterKeyGUIView, sizeof(MasterKeyGUIView)); @@ -10381,10 +10601,6 @@ int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpsz InitApp (hInstance, lpszCommandLine); - // Write block size greater than 64 KB causes a performance drop when writing to files on XP/Vista - if (!IsOSAtLeast (WIN_7)) - FormatWriteBufferSize = 64 * 1024; - #if TC_MAX_VOLUME_SECTOR_SIZE > 64 * 1024 #error TC_MAX_VOLUME_SECTOR_SIZE > 64 * 1024 #endif @@ -10425,7 +10641,6 @@ int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpsz DialogBoxParamW (hInstance, MAKEINTRESOURCEW (IDD_VOL_CREATION_WIZARD_DLG), NULL, (DLGPROC) MainDialogProc, (LPARAM)lpszCommandLine); - FinalizeApp (); return 0; } diff --git a/src/Format/VeraCrypt_Wizard.bmp b/src/Format/VeraCrypt_Wizard.bmp Binary files differindex 27b4b0bd..24f3028e 100644 --- a/src/Format/VeraCrypt_Wizard.bmp +++ b/src/Format/VeraCrypt_Wizard.bmp |