mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-12 19:38:26 -06:00
Add original TrueCrypt 7.1a sources
This commit is contained in:
BIN
src/Mount/Drive_icon_96dpi.bmp
Normal file
BIN
src/Mount/Drive_icon_96dpi.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
BIN
src/Mount/Drive_icon_mask_96dpi.bmp
Normal file
BIN
src/Mount/Drive_icon_mask_96dpi.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 110 B |
867
src/Mount/Favorites.cpp
Normal file
867
src/Mount/Favorites.cpp
Normal file
@@ -0,0 +1,867 @@
|
||||
/*
|
||||
Copyright (c) 2010 TrueCrypt Developers Association. All rights reserved.
|
||||
|
||||
Governed by the TrueCrypt License 3.0 the full text of which is contained in
|
||||
the file License.txt included in TrueCrypt binary and source code distribution
|
||||
packages.
|
||||
*/
|
||||
|
||||
#include "Tcdefs.h"
|
||||
#include "Platform/Finally.h"
|
||||
#include "Platform/ForEach.h"
|
||||
#include "BootEncryption.h"
|
||||
#include "Dlgcode.h"
|
||||
#include "Language.h"
|
||||
#include "Mount.h"
|
||||
#include "Resource.h"
|
||||
#include "Xml.h"
|
||||
#include "Favorites.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace TrueCrypt
|
||||
{
|
||||
vector <FavoriteVolume> FavoriteVolumes;
|
||||
vector <FavoriteVolume> SystemFavoriteVolumes;
|
||||
list <FavoriteVolume> FavoritesOnArrivalMountRequired;
|
||||
list <FavoriteVolume> FavoritesMountedOnArrivalStillConnected;
|
||||
HMENU FavoriteVolumesMenu;
|
||||
|
||||
|
||||
BOOL AddMountedVolumeToFavorites (HWND hwndDlg, int driveNo, bool systemFavorites)
|
||||
{
|
||||
VOLUME_PROPERTIES_STRUCT prop;
|
||||
DWORD bytesReturned;
|
||||
|
||||
memset (&prop, 0, sizeof (prop));
|
||||
prop.driveNo = driveNo;
|
||||
|
||||
if (!DeviceIoControl (hDriver, TC_IOCTL_GET_VOLUME_PROPERTIES, &prop, sizeof (prop), &prop, sizeof (prop), &bytesReturned, NULL))
|
||||
{
|
||||
handleWin32Error (hwndDlg);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
FavoriteVolume favorite;
|
||||
favorite.MountPoint = "X:\\";
|
||||
favorite.MountPoint[0] = (char) (prop.driveNo + 'A');
|
||||
|
||||
favorite.Path = WideToSingleString ((wchar_t *) prop.wszVolume);
|
||||
if (favorite.Path.find ("\\??\\") == 0)
|
||||
favorite.Path = favorite.Path.substr (4);
|
||||
|
||||
if (IsVolumeDeviceHosted (favorite.Path.c_str()))
|
||||
{
|
||||
// Get GUID path
|
||||
string volumeDevPath = favorite.Path;
|
||||
|
||||
wchar_t resolvedVolumeDevPath[TC_MAX_PATH];
|
||||
if (ResolveSymbolicLink (SingleStringToWide (volumeDevPath).c_str(), resolvedVolumeDevPath))
|
||||
volumeDevPath = WideToSingleString (resolvedVolumeDevPath);
|
||||
|
||||
char volumeName[TC_MAX_PATH];
|
||||
HANDLE find = FindFirstVolume (volumeName, sizeof (volumeName));
|
||||
|
||||
if (find != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
do
|
||||
{
|
||||
char findVolumeDevPath[TC_MAX_PATH];
|
||||
string vn = volumeName;
|
||||
|
||||
if (QueryDosDevice (vn.substr (4, vn.size() - 5).c_str(), findVolumeDevPath, sizeof (findVolumeDevPath)) != 0
|
||||
&& volumeDevPath == findVolumeDevPath)
|
||||
{
|
||||
favorite.VolumePathId = volumeName;
|
||||
break;
|
||||
}
|
||||
|
||||
} while (FindNextVolume (find, volumeName, sizeof (volumeName)));
|
||||
|
||||
FindVolumeClose (find);
|
||||
}
|
||||
}
|
||||
|
||||
favorite.ReadOnly = prop.readOnly ? true : false;
|
||||
favorite.Removable = prop.removable ? true : false;
|
||||
favorite.SystemEncryption = prop.partitionInInactiveSysEncScope ? true : false;
|
||||
favorite.OpenExplorerWindow = (bExplore == TRUE);
|
||||
|
||||
if (favorite.VolumePathId.empty()
|
||||
&& IsVolumeDeviceHosted (favorite.Path.c_str())
|
||||
&& favorite.Path.find ("\\\\?\\Volume{") != 0)
|
||||
{
|
||||
Warning (favorite.Path.find ("\\Partition0") == string::npos ? "FAVORITE_ADD_PARTITION_TYPE_WARNING" : "FAVORITE_ADD_DRIVE_DEV_WARNING");
|
||||
}
|
||||
|
||||
return OrganizeFavoriteVolumes (hwndDlg, systemFavorites, favorite);
|
||||
}
|
||||
|
||||
|
||||
static BOOL CALLBACK FavoriteVolumesDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
/* This dialog is used both for System Favorites and non-system Favorites.
|
||||
|
||||
The following options have different meaning in System Favorites mode:
|
||||
|
||||
IDC_FAVORITE_OPEN_EXPLORER_WIN_ON_MOUNT => MOUNT_SYSTEM_FAVORITES_ON_BOOT
|
||||
IDC_FAVORITE_DISABLE_HOTKEY => DISABLE_NONADMIN_SYS_FAVORITES_ACCESS
|
||||
|
||||
*/
|
||||
|
||||
WORD lw = LOWORD (wParam);
|
||||
static bool SystemFavoritesMode;
|
||||
static vector <FavoriteVolume> Favorites;
|
||||
static int SelectedItem;
|
||||
static HWND FavoriteListControl;
|
||||
|
||||
switch (msg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
try
|
||||
{
|
||||
FavoriteListControl = GetDlgItem (hwndDlg, IDC_FAVORITE_VOLUMES_LIST);
|
||||
|
||||
FavoriteVolumesDlgProcArguments *args = (FavoriteVolumesDlgProcArguments *) lParam;
|
||||
SystemFavoritesMode = args->SystemFavorites;
|
||||
|
||||
LocalizeDialog (hwndDlg, SystemFavoritesMode ? "SYSTEM_FAVORITES_DLG_TITLE" : "IDD_FAVORITE_VOLUMES");
|
||||
|
||||
if (SystemFavoritesMode)
|
||||
{
|
||||
RECT rec;
|
||||
|
||||
BootEncryptionStatus bootEncStatus = BootEncryption (hwndDlg).GetStatus();
|
||||
|
||||
if (!bootEncStatus.DriveMounted)
|
||||
throw ErrorException ("SYS_FAVORITES_REQUIRE_PBA");
|
||||
|
||||
ShowWindow (GetDlgItem(hwndDlg, IDC_FAVORITE_MOUNT_ON_LOGON), SW_HIDE);
|
||||
ShowWindow (GetDlgItem(hwndDlg, IDC_FAVORITE_MOUNT_ON_ARRIVAL), SW_HIDE);
|
||||
|
||||
// MOUNT_SYSTEM_FAVORITES_ON_BOOT
|
||||
|
||||
SetWindowTextW (GetDlgItem (hwndDlg, IDC_FAVORITE_OPEN_EXPLORER_WIN_ON_MOUNT), GetString ("MOUNT_SYSTEM_FAVORITES_ON_BOOT"));
|
||||
|
||||
// DISABLE_NONADMIN_SYS_FAVORITES_ACCESS
|
||||
|
||||
SetWindowTextW (GetDlgItem (hwndDlg, IDC_FAVORITE_DISABLE_HOTKEY), GetString ("DISABLE_NONADMIN_SYS_FAVORITES_ACCESS"));
|
||||
|
||||
// Group box
|
||||
|
||||
GetClientRect (GetDlgItem (hwndDlg, IDC_FAV_VOL_OPTIONS_GROUP_BOX), &rec);
|
||||
|
||||
SetWindowPos (GetDlgItem (hwndDlg, IDC_FAV_VOL_OPTIONS_GROUP_BOX), 0, 0, 0,
|
||||
rec.right,
|
||||
rec.bottom - CompensateYDPI (90),
|
||||
SWP_NOMOVE | SWP_NOZORDER);
|
||||
|
||||
InvalidateRect (GetDlgItem (hwndDlg, IDC_FAV_VOL_OPTIONS_GROUP_BOX), NULL, TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowWindow (GetDlgItem(hwndDlg, IDC_FAV_VOL_OPTIONS_GLOBAL_SETTINGS_BOX), SW_HIDE);
|
||||
}
|
||||
|
||||
Favorites.clear();
|
||||
|
||||
LVCOLUMNW column;
|
||||
SendMessageW (FavoriteListControl, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT);
|
||||
|
||||
memset (&column, 0, sizeof (column));
|
||||
column.mask = LVCF_TEXT|LVCF_WIDTH|LVCF_SUBITEM|LVCF_FMT;
|
||||
column.pszText = GetString ("DRIVE");
|
||||
column.cx = CompensateXDPI (38);
|
||||
column.fmt = LVCFMT_CENTER;
|
||||
SendMessageW (FavoriteListControl, LVM_INSERTCOLUMNW, 1, (LPARAM) &column);
|
||||
|
||||
++column.iSubItem;
|
||||
column.fmt = LVCFMT_LEFT;
|
||||
column.pszText = GetString ("LABEL");
|
||||
column.cx = CompensateXDPI (160);
|
||||
SendMessageW (FavoriteListControl, LVM_INSERTCOLUMNW, 2, (LPARAM) &column);
|
||||
|
||||
++column.iSubItem;
|
||||
column.fmt = LVCFMT_LEFT;
|
||||
column.pszText = GetString ("VOLUME");
|
||||
column.cx = CompensateXDPI (330);
|
||||
SendMessageW (FavoriteListControl, LVM_INSERTCOLUMNW, 3, (LPARAM) &column);
|
||||
|
||||
SetControls (hwndDlg, FavoriteVolume(), SystemFavoritesMode, false);
|
||||
|
||||
if (SystemFavoritesMode)
|
||||
LoadFavoriteVolumes (Favorites, true);
|
||||
else
|
||||
Favorites = FavoriteVolumes;
|
||||
|
||||
if (args->AddFavoriteVolume)
|
||||
Favorites.push_back (args->NewFavoriteVolume);
|
||||
|
||||
FillListControl (FavoriteListControl, Favorites);
|
||||
|
||||
SelectedItem = -1;
|
||||
|
||||
if (args->AddFavoriteVolume)
|
||||
{
|
||||
ListView_SetItemState (FavoriteListControl, Favorites.size() - 1, LVIS_SELECTED, LVIS_SELECTED);
|
||||
ListView_EnsureVisible (FavoriteListControl, Favorites.size() - 1, FALSE);
|
||||
}
|
||||
|
||||
if (SystemFavoritesMode)
|
||||
SetDlgItemTextW (hwndDlg, IDC_FAVORITES_HELP_LINK, GetString ("SYS_FAVORITES_HELP_LINK"));
|
||||
|
||||
ToHyperlink (hwndDlg, IDC_FAVORITES_HELP_LINK);
|
||||
}
|
||||
catch (Exception &e)
|
||||
{
|
||||
e.Show (hwndDlg);
|
||||
EndDialog (hwndDlg, IDCLOSE);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
|
||||
case WM_COMMAND:
|
||||
|
||||
switch (lw)
|
||||
{
|
||||
case IDOK:
|
||||
|
||||
/* Global System Favorites settings */
|
||||
|
||||
if (SystemFavoritesMode)
|
||||
{
|
||||
BootEncryption BootEncObj (NULL);
|
||||
|
||||
if (BootEncObj.GetStatus().DriveMounted)
|
||||
{
|
||||
try
|
||||
{
|
||||
uint32 reqConfig = IsDlgButtonChecked (hwndDlg, IDC_FAVORITE_OPEN_EXPLORER_WIN_ON_MOUNT) ? TC_DRIVER_CONFIG_CACHE_BOOT_PASSWORD_FOR_SYS_FAVORITES : 0;
|
||||
if (reqConfig != (ReadDriverConfigurationFlags() & TC_DRIVER_CONFIG_CACHE_BOOT_PASSWORD_FOR_SYS_FAVORITES))
|
||||
BootEncObj.RegisterSystemFavoritesService (reqConfig ? TRUE : FALSE);
|
||||
|
||||
SetDriverConfigurationFlag (TC_DRIVER_CONFIG_DISABLE_NONADMIN_SYS_FAVORITES_ACCESS, IsDlgButtonChecked (hwndDlg, IDC_FAVORITE_DISABLE_HOTKEY));
|
||||
}
|
||||
catch (Exception &e)
|
||||
{
|
||||
e.Show (hwndDlg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* (System) Favorites list */
|
||||
|
||||
if (SelectedItem != -1 && !Favorites.empty())
|
||||
SetFavoriteVolume (hwndDlg, Favorites[SelectedItem], SystemFavoritesMode);
|
||||
|
||||
if (SaveFavoriteVolumes (Favorites, SystemFavoritesMode))
|
||||
{
|
||||
if (!SystemFavoritesMode)
|
||||
{
|
||||
bMountFavoritesOnLogon = FALSE;
|
||||
|
||||
foreach (const FavoriteVolume &favorite, Favorites)
|
||||
{
|
||||
if (favorite.MountOnLogOn)
|
||||
{
|
||||
bMountFavoritesOnLogon = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!bEnableBkgTask || bCloseBkgTaskWhenNoVolumes || IsNonInstallMode())
|
||||
{
|
||||
foreach (const FavoriteVolume favorite, Favorites)
|
||||
{
|
||||
if (favorite.MountOnArrival)
|
||||
{
|
||||
Warning ("FAVORITE_ARRIVAL_MOUNT_BACKGROUND_TASK_ERR");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FavoriteVolumes = Favorites;
|
||||
|
||||
ManageStartupSeq();
|
||||
SaveSettings (hwndDlg);
|
||||
}
|
||||
else
|
||||
SystemFavoriteVolumes = Favorites;
|
||||
|
||||
OnFavoriteVolumesUpdated();
|
||||
LoadDriveLetters (GetDlgItem (MainDlg, IDC_DRIVELIST), 0);
|
||||
|
||||
EndDialog (hwndDlg, IDOK);
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
||||
case IDCANCEL:
|
||||
EndDialog (hwndDlg, IDCLOSE);
|
||||
return 1;
|
||||
|
||||
case IDC_FAVORITE_MOVE_DOWN:
|
||||
if (SelectedItem != -1 && Favorites.size() > (size_t) SelectedItem + 1)
|
||||
{
|
||||
swap (Favorites[SelectedItem], Favorites[SelectedItem + 1]);
|
||||
|
||||
FillListControl (FavoriteListControl, Favorites);
|
||||
++SelectedItem;
|
||||
ListView_SetItemState (FavoriteListControl, SelectedItem, LVIS_SELECTED, LVIS_SELECTED);
|
||||
ListView_EnsureVisible (FavoriteListControl, SelectedItem, FALSE);
|
||||
}
|
||||
return 1;
|
||||
|
||||
case IDC_FAVORITE_MOVE_UP:
|
||||
if (SelectedItem > 0)
|
||||
{
|
||||
swap (Favorites[SelectedItem], Favorites[SelectedItem - 1]);
|
||||
|
||||
FillListControl (FavoriteListControl, Favorites);
|
||||
--SelectedItem;
|
||||
ListView_SetItemState (FavoriteListControl, SelectedItem, LVIS_SELECTED, LVIS_SELECTED);
|
||||
ListView_EnsureVisible (FavoriteListControl, SelectedItem, FALSE);
|
||||
}
|
||||
return 1;
|
||||
|
||||
case IDC_FAVORITE_REMOVE:
|
||||
if (SelectedItem != -1)
|
||||
{
|
||||
Favorites.erase (Favorites.begin() + SelectedItem);
|
||||
FillListControl (GetDlgItem (hwndDlg, IDC_FAVORITE_VOLUMES_LIST), Favorites);
|
||||
SetControls (hwndDlg, FavoriteVolume(), SystemFavoritesMode, false);
|
||||
SelectedItem = -1;
|
||||
}
|
||||
return 1;
|
||||
|
||||
|
||||
case IDC_FAVORITE_OPEN_EXPLORER_WIN_ON_MOUNT: // Note that this option means "MOUNT_SYSTEM_FAVORITES_ON_BOOT" when SystemFavoritesMode is true
|
||||
if (SystemFavoritesMode)
|
||||
{
|
||||
// MOUNT_SYSTEM_FAVORITES_ON_BOOT
|
||||
|
||||
if (IsDlgButtonChecked (hwndDlg, IDC_FAVORITE_OPEN_EXPLORER_WIN_ON_MOUNT))
|
||||
{
|
||||
WarningDirect ((wstring (GetString ("SYS_FAVORITES_KEYBOARD_WARNING")) + L"\n\n" + GetString ("BOOT_PASSWORD_CACHE_KEYBOARD_WARNING")).c_str());
|
||||
|
||||
if (!IsServerOS() && !IsDlgButtonChecked (hwndDlg, IDC_FAVORITE_DISABLE_HOTKEY))
|
||||
Info ("SYS_FAVORITES_ADMIN_ONLY_INFO");
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
|
||||
case IDC_FAVORITE_DISABLE_HOTKEY: // Note that this option means "DISABLE_NONADMIN_SYS_FAVORITES_ACCESS" when SystemFavoritesMode is true
|
||||
if (SystemFavoritesMode)
|
||||
{
|
||||
// DISABLE_NONADMIN_SYS_FAVORITES_ACCESS
|
||||
|
||||
if (IsDlgButtonChecked (hwndDlg, IDC_FAVORITE_DISABLE_HOTKEY))
|
||||
WarningDirect ((wstring (GetString ("SYS_FAVORITES_ADMIN_ONLY_WARNING")) + L"\n\n" + GetString ("SETTING_REQUIRES_REBOOT")).c_str());
|
||||
else
|
||||
Warning ("SETTING_REQUIRES_REBOOT");
|
||||
}
|
||||
return 1;
|
||||
|
||||
case IDC_FAVORITES_HELP_LINK:
|
||||
Applink (SystemFavoritesMode ? "sysfavorites" : "favorites", TRUE, "");
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
case WM_NOTIFY:
|
||||
if (((LPNMHDR) lParam)->code == LVN_ITEMCHANGED)
|
||||
{
|
||||
static bool reentry = false;
|
||||
if (reentry)
|
||||
break;
|
||||
|
||||
reentry = true;
|
||||
|
||||
if (SelectedItem != -1)
|
||||
{
|
||||
SetFavoriteVolume (hwndDlg, Favorites[SelectedItem], SystemFavoritesMode);
|
||||
FillListControlSubItems (FavoriteListControl, SelectedItem, Favorites[SelectedItem]);
|
||||
}
|
||||
|
||||
SelectedItem = ListView_GetNextItem (GetDlgItem (hwndDlg, IDC_FAVORITE_VOLUMES_LIST), -1, LVIS_SELECTED);
|
||||
|
||||
if (SelectedItem != -1)
|
||||
SetControls (hwndDlg, Favorites[SelectedItem], SystemFavoritesMode);
|
||||
else
|
||||
SetControls (hwndDlg, FavoriteVolume(), SystemFavoritesMode, false);
|
||||
|
||||
reentry = false;
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_CLOSE:
|
||||
EndDialog (hwndDlg, IDCLOSE);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static void FillFavoriteVolumesMenu ()
|
||||
{
|
||||
while (DeleteMenu (FavoriteVolumesMenu, 7, MF_BYPOSITION)) { }
|
||||
|
||||
if (FavoriteVolumes.empty())
|
||||
return;
|
||||
|
||||
AppendMenu (FavoriteVolumesMenu, MF_SEPARATOR, 0, NULL);
|
||||
|
||||
int i = 0;
|
||||
foreach (const FavoriteVolume &favorite, FavoriteVolumes)
|
||||
{
|
||||
UINT flags = MF_STRING;
|
||||
|
||||
if (favorite.DisconnectedDevice)
|
||||
flags |= MF_GRAYED;
|
||||
|
||||
wstring menuText = SingleStringToWide (favorite.Path);
|
||||
if (favorite.DisconnectedDevice)
|
||||
menuText = favorite.Label.empty() ? wstring (L"(") + GetString ("FAVORITE_DISCONNECTED_DEV") + L")" : L"";
|
||||
|
||||
if (!favorite.Label.empty())
|
||||
{
|
||||
if (favorite.DisconnectedDevice)
|
||||
menuText = favorite.Label + L" " + menuText;
|
||||
else
|
||||
menuText = favorite.Label;
|
||||
}
|
||||
|
||||
AppendMenuW (FavoriteVolumesMenu, flags, TC_FAVORITE_MENU_CMD_ID_OFFSET + i++,
|
||||
(menuText + L"\t" + SingleStringToWide (favorite.MountPoint).substr (0, 2)).c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void FillListControl (HWND favoriteListControl, vector <FavoriteVolume> &favorites)
|
||||
{
|
||||
SendMessage (favoriteListControl, LVM_DELETEALLITEMS, 0, 0);
|
||||
|
||||
int line = 0;
|
||||
foreach (const FavoriteVolume favorite, favorites)
|
||||
{
|
||||
ListItemAdd (favoriteListControl, line, (char *) favorite.MountPoint.substr (0, 2).c_str());
|
||||
FillListControlSubItems (favoriteListControl, line++, favorite);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void FillListControlSubItems (HWND FavoriteListControl, int line, const FavoriteVolume &favorite)
|
||||
{
|
||||
ListSubItemSetW (FavoriteListControl, line, 1, (wchar_t *) favorite.Label.c_str());
|
||||
|
||||
if (favorite.DisconnectedDevice)
|
||||
ListSubItemSetW (FavoriteListControl, line, 2, (wchar_t *) (wstring (L"(") + GetString ("FAVORITE_DISCONNECTED_DEV") + L")").c_str());
|
||||
else
|
||||
ListSubItemSet (FavoriteListControl, line, 2, (char *) favorite.Path.c_str());
|
||||
}
|
||||
|
||||
|
||||
wstring GetFavoriteVolumeLabel (const string &volumePath)
|
||||
{
|
||||
foreach (const FavoriteVolume &favorite, FavoriteVolumes)
|
||||
{
|
||||
if (favorite.Path == volumePath)
|
||||
return favorite.Label;
|
||||
}
|
||||
|
||||
foreach (const FavoriteVolume &favorite, SystemFavoriteVolumes)
|
||||
{
|
||||
if (favorite.Path == volumePath)
|
||||
return favorite.Label;
|
||||
}
|
||||
|
||||
return wstring();
|
||||
}
|
||||
|
||||
|
||||
void LoadFavoriteVolumes ()
|
||||
{
|
||||
LoadFavoriteVolumes (FavoriteVolumes, false);
|
||||
|
||||
try
|
||||
{
|
||||
LoadFavoriteVolumes (SystemFavoriteVolumes, true, true);
|
||||
}
|
||||
catch (...) { } // Ignore errors as SystemFavoriteVolumes list is used only for resolving volume paths to labels
|
||||
|
||||
OnFavoriteVolumesUpdated();
|
||||
}
|
||||
|
||||
|
||||
void LoadFavoriteVolumes (vector <FavoriteVolume> &favorites, bool systemFavorites, bool noUacElevation)
|
||||
{
|
||||
favorites.clear();
|
||||
string favoritesFilePath = systemFavorites ? GetServiceConfigPath (TC_APPD_FILENAME_SYSTEM_FAVORITE_VOLUMES) : GetConfigPath (TC_APPD_FILENAME_FAVORITE_VOLUMES);
|
||||
|
||||
if (systemFavorites && !IsAdmin() && !noUacElevation)
|
||||
{
|
||||
favoritesFilePath = GetConfigPath (TC_APPD_FILENAME_SYSTEM_FAVORITE_VOLUMES);
|
||||
|
||||
try
|
||||
{
|
||||
BootEncryption bootEnc (MainDlg);
|
||||
bootEnc.CopyFileAdmin (GetServiceConfigPath (TC_APPD_FILENAME_SYSTEM_FAVORITE_VOLUMES).c_str(), favoritesFilePath.c_str());
|
||||
}
|
||||
catch (SystemException &e)
|
||||
{
|
||||
if (e.ErrorCode == ERROR_FILE_NOT_FOUND)
|
||||
return;
|
||||
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
DWORD size;
|
||||
char *favoritesXml = LoadFile (favoritesFilePath.c_str(), &size);
|
||||
|
||||
if (systemFavorites && !IsAdmin() && !noUacElevation)
|
||||
DeleteFile (GetConfigPath (TC_APPD_FILENAME_SYSTEM_FAVORITE_VOLUMES));
|
||||
|
||||
char *xml = favoritesXml;
|
||||
char mountPoint[MAX_PATH], volume[MAX_PATH];
|
||||
|
||||
if (xml == NULL)
|
||||
return;
|
||||
|
||||
while (xml = XmlFindElement (xml, "volume"))
|
||||
{
|
||||
FavoriteVolume favorite;
|
||||
|
||||
XmlGetAttributeText (xml, "mountpoint", mountPoint, sizeof (mountPoint));
|
||||
favorite.MountPoint = mountPoint;
|
||||
|
||||
XmlGetNodeText (xml, volume, sizeof (volume));
|
||||
favorite.Path = WideToSingleString (Utf8StringToWide (volume));
|
||||
|
||||
char label[1024];
|
||||
XmlGetAttributeText (xml, "label", label, sizeof (label));
|
||||
favorite.Label = Utf8StringToWide (label);
|
||||
|
||||
char boolVal[2];
|
||||
XmlGetAttributeText (xml, "readonly", boolVal, sizeof (boolVal));
|
||||
if (boolVal[0])
|
||||
favorite.ReadOnly = (boolVal[0] == '1');
|
||||
|
||||
XmlGetAttributeText (xml, "removable", boolVal, sizeof (boolVal));
|
||||
if (boolVal[0])
|
||||
favorite.Removable = (boolVal[0] == '1');
|
||||
|
||||
XmlGetAttributeText (xml, "system", boolVal, sizeof (boolVal));
|
||||
if (boolVal[0])
|
||||
favorite.SystemEncryption = (boolVal[0] == '1');
|
||||
|
||||
XmlGetAttributeText (xml, "noHotKeyMount", boolVal, sizeof (boolVal));
|
||||
if (boolVal[0])
|
||||
favorite.DisableHotkeyMount = (boolVal[0] == '1');
|
||||
|
||||
XmlGetAttributeText (xml, "openExplorerWindow", boolVal, sizeof (boolVal));
|
||||
if (boolVal[0])
|
||||
favorite.OpenExplorerWindow = (boolVal[0] == '1');
|
||||
|
||||
XmlGetAttributeText (xml, "mountOnArrival", boolVal, sizeof (boolVal));
|
||||
if (boolVal[0])
|
||||
favorite.MountOnArrival = (boolVal[0] == '1');
|
||||
|
||||
XmlGetAttributeText (xml, "mountOnLogOn", boolVal, sizeof (boolVal));
|
||||
if (boolVal[0])
|
||||
favorite.MountOnLogOn = (boolVal[0] == '1');
|
||||
|
||||
if (favorite.Path.find ("\\\\?\\Volume{") == 0 && favorite.Path.rfind ("}\\") == favorite.Path.size() - 2)
|
||||
{
|
||||
string resolvedPath = VolumeGuidPathToDevicePath (favorite.Path);
|
||||
if (!resolvedPath.empty())
|
||||
{
|
||||
favorite.DisconnectedDevice = false;
|
||||
favorite.VolumePathId = favorite.Path;
|
||||
favorite.Path = resolvedPath;
|
||||
}
|
||||
else
|
||||
favorite.DisconnectedDevice = true;
|
||||
}
|
||||
|
||||
favorites.push_back (favorite);
|
||||
xml++;
|
||||
}
|
||||
|
||||
free (favoritesXml);
|
||||
}
|
||||
|
||||
|
||||
static void OnFavoriteVolumesUpdated ()
|
||||
{
|
||||
FillFavoriteVolumesMenu();
|
||||
|
||||
FavoritesOnArrivalMountRequired.clear();
|
||||
|
||||
foreach (const FavoriteVolume favorite, FavoriteVolumes)
|
||||
{
|
||||
if (favorite.MountOnArrival)
|
||||
{
|
||||
FavoritesOnArrivalMountRequired.push_back (favorite);
|
||||
|
||||
if (IsMountedVolume (favorite.Path.c_str()))
|
||||
{
|
||||
bool present = false;
|
||||
|
||||
foreach (const FavoriteVolume favoriteConnected, FavoritesMountedOnArrivalStillConnected)
|
||||
{
|
||||
if (favorite.Path == favoriteConnected.Path)
|
||||
{
|
||||
present = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!present)
|
||||
FavoritesMountedOnArrivalStillConnected.push_back (favorite);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BOOL OrganizeFavoriteVolumes (HWND hwndDlg, bool systemFavorites, const FavoriteVolume &newFavorite)
|
||||
{
|
||||
FavoriteVolumesDlgProcArguments args;
|
||||
args.SystemFavorites = systemFavorites;
|
||||
|
||||
if (!newFavorite.Path.empty())
|
||||
{
|
||||
args.AddFavoriteVolume = true;
|
||||
args.NewFavoriteVolume = newFavorite;
|
||||
}
|
||||
else
|
||||
args.AddFavoriteVolume = false;
|
||||
|
||||
return DialogBoxParamW (hInst, MAKEINTRESOURCEW (IDD_FAVORITE_VOLUMES), hwndDlg, (DLGPROC) FavoriteVolumesDlgProc, (LPARAM) &args) == IDOK;
|
||||
}
|
||||
|
||||
|
||||
static bool SaveFavoriteVolumes (const vector <FavoriteVolume> &favorites, bool systemFavorites)
|
||||
{
|
||||
FILE *f;
|
||||
int cnt = 0;
|
||||
|
||||
f = fopen (GetConfigPath (systemFavorites ? TC_APPD_FILENAME_SYSTEM_FAVORITE_VOLUMES : TC_APPD_FILENAME_FAVORITE_VOLUMES), "w,ccs=UTF-8");
|
||||
if (f == NULL)
|
||||
{
|
||||
handleWin32Error (MainDlg);
|
||||
return false;
|
||||
}
|
||||
|
||||
XmlWriteHeaderW (f);
|
||||
fputws (L"\n\t<favorites>", f);
|
||||
|
||||
foreach (const FavoriteVolume &favorite, favorites)
|
||||
{
|
||||
char tq[2048];
|
||||
|
||||
if (systemFavorites && favorite.Path.find ("\\\\") == 0 && favorite.Path.find ("Volume{") == string::npos)
|
||||
Warning ("SYSTEM_FAVORITE_NETWORK_PATH_ERR");
|
||||
|
||||
XmlQuoteText (!favorite.VolumePathId.empty() ? favorite.VolumePathId.c_str() : favorite.Path.c_str(), tq, sizeof (tq));
|
||||
|
||||
wstring s = L"\n\t\t<volume mountpoint=\"" + SingleStringToWide (favorite.MountPoint) + L"\"";
|
||||
|
||||
if (!favorite.Label.empty())
|
||||
s += L" label=\"" + favorite.Label + L"\"";
|
||||
|
||||
if (favorite.ReadOnly)
|
||||
s += L" readonly=\"1\"";
|
||||
|
||||
if (favorite.Removable)
|
||||
s += L" removable=\"1\"";
|
||||
|
||||
if (favorite.SystemEncryption)
|
||||
s += L" system=\"1\"";
|
||||
|
||||
if (favorite.MountOnArrival)
|
||||
s += L" mountOnArrival=\"1\"";
|
||||
|
||||
if (favorite.MountOnLogOn)
|
||||
s += L" mountOnLogOn=\"1\"";
|
||||
|
||||
if (favorite.DisableHotkeyMount)
|
||||
s += L" noHotKeyMount=\"1\"";
|
||||
|
||||
if (favorite.OpenExplorerWindow)
|
||||
s += L" openExplorerWindow=\"1\"";
|
||||
|
||||
s += L">" + SingleStringToWide (tq) + L"</volume>";
|
||||
|
||||
fwprintf (f, L"%ws", s.c_str());
|
||||
cnt++;
|
||||
}
|
||||
|
||||
fputws (L"\n\t</favorites>", f);
|
||||
XmlWriteFooterW (f);
|
||||
|
||||
if (!CheckFileStreamWriteErrors (f, systemFavorites ? TC_APPD_FILENAME_SYSTEM_FAVORITE_VOLUMES : TC_APPD_FILENAME_FAVORITE_VOLUMES))
|
||||
{
|
||||
fclose (f);
|
||||
return false;
|
||||
}
|
||||
|
||||
fclose (f);
|
||||
|
||||
BootEncryption bootEnc (MainDlg);
|
||||
|
||||
if (systemFavorites)
|
||||
{
|
||||
finally_do ({ remove (GetConfigPath (TC_APPD_FILENAME_SYSTEM_FAVORITE_VOLUMES)); });
|
||||
|
||||
try
|
||||
{
|
||||
bootEnc.DeleteFileAdmin (GetServiceConfigPath (TC_APPD_FILENAME_SYSTEM_FAVORITE_VOLUMES).c_str());
|
||||
}
|
||||
catch (UserAbort&) { return false; }
|
||||
catch (...) { }
|
||||
|
||||
try
|
||||
{
|
||||
if (cnt != 0)
|
||||
{
|
||||
bootEnc.CopyFileAdmin (GetConfigPath (TC_APPD_FILENAME_SYSTEM_FAVORITE_VOLUMES), GetServiceConfigPath (TC_APPD_FILENAME_SYSTEM_FAVORITE_VOLUMES).c_str());
|
||||
|
||||
if (!(ReadDriverConfigurationFlags() & TC_DRIVER_CONFIG_CACHE_BOOT_PASSWORD_FOR_SYS_FAVORITES))
|
||||
Info ("SYS_FAVORITE_VOLUMES_SAVED");
|
||||
}
|
||||
}
|
||||
catch (Exception &e)
|
||||
{
|
||||
e.Show (NULL);
|
||||
}
|
||||
}
|
||||
|
||||
if (cnt == 0)
|
||||
{
|
||||
if (systemFavorites)
|
||||
{
|
||||
try
|
||||
{
|
||||
bootEnc.DeleteFileAdmin (GetServiceConfigPath (TC_APPD_FILENAME_SYSTEM_FAVORITE_VOLUMES).c_str());
|
||||
}
|
||||
catch (...) { }
|
||||
}
|
||||
else
|
||||
remove (GetConfigPath (TC_APPD_FILENAME_FAVORITE_VOLUMES));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
static void SetControls (HWND hwndDlg, const FavoriteVolume &favorite, bool systemFavoritesMode, bool enable)
|
||||
{
|
||||
SetDlgItemTextW (hwndDlg, IDC_FAVORITE_LABEL, favorite.Label.c_str());
|
||||
SetCheckBox (hwndDlg, IDC_FAVORITE_MOUNT_ON_LOGON, favorite.MountOnLogOn);
|
||||
SetCheckBox (hwndDlg, IDC_FAVORITE_MOUNT_ON_ARRIVAL, favorite.MountOnArrival);
|
||||
SetCheckBox (hwndDlg, IDC_FAVORITE_MOUNT_READONLY, favorite.ReadOnly);
|
||||
SetCheckBox (hwndDlg, IDC_FAVORITE_MOUNT_REMOVABLE, favorite.Removable);
|
||||
|
||||
if (systemFavoritesMode)
|
||||
{
|
||||
uint32 driverConfig = ReadDriverConfigurationFlags();
|
||||
|
||||
// MOUNT_SYSTEM_FAVORITES_ON_BOOT
|
||||
CheckDlgButton (hwndDlg, IDC_FAVORITE_OPEN_EXPLORER_WIN_ON_MOUNT, (driverConfig & TC_DRIVER_CONFIG_CACHE_BOOT_PASSWORD_FOR_SYS_FAVORITES) ? BST_CHECKED : BST_UNCHECKED);
|
||||
|
||||
// DISABLE_NONADMIN_SYS_FAVORITES_ACCESS
|
||||
CheckDlgButton (hwndDlg, IDC_FAVORITE_DISABLE_HOTKEY, (driverConfig & TC_DRIVER_CONFIG_DISABLE_NONADMIN_SYS_FAVORITES_ACCESS) ? BST_CHECKED : BST_UNCHECKED);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetCheckBox (hwndDlg, IDC_FAVORITE_OPEN_EXPLORER_WIN_ON_MOUNT, favorite.OpenExplorerWindow);
|
||||
SetCheckBox (hwndDlg, IDC_FAVORITE_DISABLE_HOTKEY, favorite.DisableHotkeyMount);
|
||||
}
|
||||
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_FAVORITE_MOVE_UP), enable);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_FAVORITE_MOVE_DOWN), enable);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_FAVORITE_REMOVE), enable);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDT_FAVORITE_LABEL), enable);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_FAVORITE_LABEL), enable);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_FAVORITE_MOUNT_ON_LOGON), enable && !systemFavoritesMode);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_FAVORITE_MOUNT_ON_ARRIVAL), enable && !systemFavoritesMode);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_FAVORITE_MOUNT_READONLY), enable);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_FAVORITE_MOUNT_REMOVABLE), enable);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_FAVORITE_OPEN_EXPLORER_WIN_ON_MOUNT), enable || systemFavoritesMode);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_FAVORITE_DISABLE_HOTKEY), enable || systemFavoritesMode);
|
||||
}
|
||||
|
||||
|
||||
static void SetFavoriteVolume (HWND hwndDlg, FavoriteVolume &favorite, bool systemFavoritesMode)
|
||||
{
|
||||
wchar_t label[1024];
|
||||
if (GetDlgItemTextW (hwndDlg, IDC_FAVORITE_LABEL, label, ARRAYSIZE (label)) != 0)
|
||||
{
|
||||
favorite.Label = label;
|
||||
|
||||
for (size_t i = 0; i < favorite.Label.size(); ++i)
|
||||
{
|
||||
if (favorite.Label[i] == L'"')
|
||||
favorite.Label.at (i) = L'\'';
|
||||
}
|
||||
}
|
||||
else
|
||||
favorite.Label.clear();
|
||||
|
||||
favorite.ReadOnly = (IsDlgButtonChecked (hwndDlg, IDC_FAVORITE_MOUNT_READONLY) != 0);
|
||||
favorite.Removable = (IsDlgButtonChecked (hwndDlg, IDC_FAVORITE_MOUNT_REMOVABLE) != 0);
|
||||
|
||||
if (!systemFavoritesMode)
|
||||
{
|
||||
favorite.MountOnLogOn = (IsDlgButtonChecked (hwndDlg, IDC_FAVORITE_MOUNT_ON_LOGON) != 0);
|
||||
favorite.MountOnArrival = (IsDlgButtonChecked (hwndDlg, IDC_FAVORITE_MOUNT_ON_ARRIVAL) != 0);
|
||||
favorite.DisableHotkeyMount = (IsDlgButtonChecked (hwndDlg, IDC_FAVORITE_DISABLE_HOTKEY) != 0);
|
||||
favorite.OpenExplorerWindow = (IsDlgButtonChecked (hwndDlg, IDC_FAVORITE_OPEN_EXPLORER_WIN_ON_MOUNT) != 0);
|
||||
}
|
||||
|
||||
if (favorite.VolumePathId.empty()
|
||||
&& IsVolumeDeviceHosted (favorite.Path.c_str())
|
||||
&& favorite.Path.find ("\\\\?\\Volume{") != 0)
|
||||
{
|
||||
bool partition = (favorite.Path.find ("\\Partition0") == string::npos);
|
||||
|
||||
if (!favorite.Label.empty())
|
||||
{
|
||||
ErrorDirect ((GetString (partition ? "FAVORITE_LABEL_PARTITION_TYPE_ERR" : "FAVORITE_LABEL_DEVICE_PATH_ERR") + wstring (L"\n\n") + SingleStringToWide (favorite.Path)).c_str());
|
||||
favorite.Label.clear();
|
||||
}
|
||||
|
||||
if (favorite.MountOnArrival)
|
||||
{
|
||||
ErrorDirect ((GetString (partition ? "FAVORITE_ARRIVAL_MOUNT_PARTITION_TYPE_ERR" : "FAVORITE_ARRIVAL_MOUNT_DEVICE_PATH_ERR") + wstring (L"\n\n") + SingleStringToWide (favorite.Path)).c_str());
|
||||
favorite.MountOnArrival = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (favorite.MountOnArrival && favorite.Path.find ("\\\\") == 0 && favorite.Path.find ("Volume{") == string::npos)
|
||||
{
|
||||
Error ("FAVORITE_ARRIVAL_MOUNT_NETWORK_PATH_ERR");
|
||||
favorite.MountOnArrival = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void UpdateDeviceHostedFavoriteVolumes ()
|
||||
{
|
||||
try
|
||||
{
|
||||
LoadFavoriteVolumes();
|
||||
}
|
||||
catch (Exception &e)
|
||||
{
|
||||
e.Show (MainDlg);
|
||||
}
|
||||
}
|
||||
}
|
||||
74
src/Mount/Favorites.h
Normal file
74
src/Mount/Favorites.h
Normal file
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
Copyright (c) 2010 TrueCrypt Developers Association. All rights reserved.
|
||||
|
||||
Governed by the TrueCrypt License 3.0 the full text of which is contained in
|
||||
the file License.txt included in TrueCrypt binary and source code distribution
|
||||
packages.
|
||||
*/
|
||||
|
||||
#ifndef TC_HEADER_Mount_FavoriteVolumes
|
||||
#define TC_HEADER_Mount_FavoriteVolumes
|
||||
|
||||
#include <Tcdefs.h>
|
||||
|
||||
namespace TrueCrypt
|
||||
{
|
||||
struct FavoriteVolume
|
||||
{
|
||||
FavoriteVolume()
|
||||
:
|
||||
DisableHotkeyMount (false),
|
||||
DisconnectedDevice (false),
|
||||
MountOnLogOn (false),
|
||||
MountOnArrival (false),
|
||||
OpenExplorerWindow (false),
|
||||
ReadOnly (false),
|
||||
Removable (false),
|
||||
SystemEncryption (false)
|
||||
{
|
||||
}
|
||||
|
||||
string Path;
|
||||
string MountPoint;
|
||||
string VolumePathId;
|
||||
wstring Label;
|
||||
|
||||
bool DisableHotkeyMount;
|
||||
bool DisconnectedDevice;
|
||||
bool MountOnLogOn;
|
||||
bool MountOnArrival;
|
||||
bool OpenExplorerWindow;
|
||||
bool ReadOnly;
|
||||
bool Removable;
|
||||
bool SystemEncryption;
|
||||
};
|
||||
|
||||
struct FavoriteVolumesDlgProcArguments
|
||||
{
|
||||
bool SystemFavorites;
|
||||
bool AddFavoriteVolume;
|
||||
FavoriteVolume NewFavoriteVolume;
|
||||
};
|
||||
|
||||
extern vector <FavoriteVolume> FavoriteVolumes;
|
||||
extern list <FavoriteVolume> FavoritesOnArrivalMountRequired;
|
||||
extern list <FavoriteVolume> FavoritesMountedOnArrivalStillConnected;
|
||||
extern HMENU FavoriteVolumesMenu;
|
||||
|
||||
BOOL AddMountedVolumeToFavorites (HWND hwndDlg, int driveNo, bool systemFavorites);
|
||||
static BOOL CALLBACK FavoriteVolumesDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
|
||||
static void FillFavoriteVolumesMenu ();
|
||||
static void FillListControl (HWND favoriteListControl, vector <FavoriteVolume> &favorites);
|
||||
static void FillListControlSubItems (HWND favoriteListControl, int line, const FavoriteVolume &favorite);
|
||||
wstring GetFavoriteVolumeLabel (const string &volumePath);
|
||||
void LoadFavoriteVolumes ();
|
||||
void LoadFavoriteVolumes (vector <FavoriteVolume> &favorites, bool systemFavorites, bool noUacElevation = false);
|
||||
static void OnFavoriteVolumesUpdated ();
|
||||
BOOL OrganizeFavoriteVolumes (HWND hwndDlg, bool systemFavorites, const FavoriteVolume &newFavorite = FavoriteVolume());
|
||||
static bool SaveFavoriteVolumes (const vector <FavoriteVolume> &favorites, bool systemFavorites);
|
||||
static void SetControls (HWND hwndDlg, const FavoriteVolume &favorite, bool systemFavoritesMode, bool enable = true);
|
||||
static void SetFavoriteVolume (HWND hwndDlg, FavoriteVolume &favorite, bool systemFavoritesMode);
|
||||
void UpdateDeviceHostedFavoriteVolumes ();
|
||||
}
|
||||
|
||||
#endif // TC_HEADER_Mount_FavoriteVolumes
|
||||
525
src/Mount/Hotkeys.c
Normal file
525
src/Mount/Hotkeys.c
Normal file
@@ -0,0 +1,525 @@
|
||||
/*
|
||||
Copyright (c) 2005 TrueCrypt Developers Association. All rights reserved.
|
||||
|
||||
Governed by the TrueCrypt License 3.0 the full text of which is contained in
|
||||
the file License.txt included in TrueCrypt binary and source code distribution
|
||||
packages.
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include "Dlgcode.h"
|
||||
#include "Hotkeys.h"
|
||||
#include "Language.h"
|
||||
#include "Mount.h"
|
||||
#include "Resource.h"
|
||||
|
||||
#define MAX_KEY_COMB_NAME_LEN 260
|
||||
|
||||
TCHOTKEY Hotkeys [NBR_HOTKEYS];
|
||||
static TCHOTKEY tmpHotkeys [NBR_HOTKEYS];
|
||||
|
||||
static int nSelectedHotkeyId;
|
||||
static UINT currentVKeyCode;
|
||||
|
||||
|
||||
static void ScanAndProcessKey (UINT *vKeyCode, wchar_t *keyName)
|
||||
{
|
||||
UINT vKey;
|
||||
*vKeyCode = 0;
|
||||
|
||||
for (vKey = 0; vKey <= 0xFF; vKey++)
|
||||
{
|
||||
if (GetAsyncKeyState (vKey) < 0)
|
||||
{
|
||||
if (GetKeyName (vKey, keyName)) // If the key is allowed and its name has been resolved
|
||||
*vKeyCode = vKey;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Returns TRUE if the key is allowed and its name is resolved. */
|
||||
BOOL GetKeyName (UINT vKey, wchar_t *keyName)
|
||||
{
|
||||
BOOL result = TRUE;
|
||||
|
||||
if (vKey >= 0x30 && vKey <= 0x5a)
|
||||
{
|
||||
// ASCII characters
|
||||
wsprintfW (keyName, L"%hc", (char) vKey);
|
||||
}
|
||||
else if (vKey >= 0xE9 && vKey <= 0xF5)
|
||||
{
|
||||
// OEM-specific
|
||||
wsprintfW (keyName, L"OEM-%d", vKey);
|
||||
}
|
||||
else if (vKey >= VK_F1 && vKey <= VK_F24)
|
||||
{
|
||||
// F1-F24
|
||||
wsprintfW (keyName, L"F%d", vKey - VK_F1 + 1);
|
||||
}
|
||||
else if (vKey >= VK_NUMPAD0 && vKey <= VK_NUMPAD9)
|
||||
{
|
||||
// Numpad numbers
|
||||
wsprintfW (keyName, L"%s %d", GetString ("VK_NUMPAD"), vKey - VK_NUMPAD0);
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (vKey)
|
||||
{
|
||||
case VK_MULTIPLY: wsprintfW (keyName, L"%s *", GetString ("VK_NUMPAD")); break;
|
||||
case VK_ADD: wsprintfW (keyName, L"%s +", GetString ("VK_NUMPAD")); break;
|
||||
case VK_SEPARATOR: wsprintfW (keyName, L"%s Separator", GetString ("VK_NUMPAD")); break;
|
||||
case VK_SUBTRACT: wsprintfW (keyName, L"%s -", GetString ("VK_NUMPAD")); break;
|
||||
case VK_DECIMAL: wsprintfW (keyName, L"%s .", GetString ("VK_NUMPAD")); break;
|
||||
case VK_DIVIDE: wsprintfW (keyName, L"%s /", GetString ("VK_NUMPAD")); break;
|
||||
case VK_OEM_1: wcscpy (keyName, L"OEM 1 (';')"); break;
|
||||
case VK_OEM_PLUS: wcscpy (keyName, L"+"); break;
|
||||
case VK_OEM_COMMA: wcscpy (keyName, L","); break;
|
||||
case VK_OEM_MINUS: wcscpy (keyName, L"-"); break;
|
||||
case VK_OEM_PERIOD: wcscpy (keyName, L"."); break;
|
||||
case VK_OEM_2: wcscpy (keyName, L"OEM 2 ('/')"); break;
|
||||
case VK_OEM_3: wcscpy (keyName, L"OEM 3 (`)"); break;
|
||||
case VK_OEM_4: wcscpy (keyName, L"OEM 4 ('[')"); break;
|
||||
case VK_OEM_5: wcscpy (keyName, L"OEM 5 ('\\')"); break;
|
||||
case VK_OEM_6: wcscpy (keyName, L"OEM 6 (']')"); break;
|
||||
case VK_OEM_7: wcscpy (keyName, L"OEM 7 (')"); break;
|
||||
case VK_OEM_8: wcscpy (keyName, L"OEM 8"); break;
|
||||
case VK_OEM_AX: wcscpy (keyName, L"OEM AX"); break;
|
||||
case VK_OEM_102: wcscpy (keyName, L"OEM 102"); break;
|
||||
case VK_ICO_HELP: wcscpy (keyName, L"ICO_HELP"); break;
|
||||
case VK_ICO_00: wcscpy (keyName, L"ICO_00"); break;
|
||||
case VK_ICO_CLEAR: wcscpy (keyName, L"ICO_CLEAR"); break;
|
||||
case VK_ATTN: wcscpy (keyName, L"Attn"); break;
|
||||
case VK_CRSEL: wcscpy (keyName, L"CrSel"); break;
|
||||
case VK_EXSEL: wcscpy (keyName, L"ExSel"); break;
|
||||
case VK_EREOF: wcscpy (keyName, L"Erase EOF"); break;
|
||||
case VK_PA1: wcscpy (keyName, L"PA1"); break;
|
||||
case VK_OEM_CLEAR: wcscpy (keyName, L"OEM Clear"); break;
|
||||
|
||||
case 0:
|
||||
case 1:
|
||||
case 0xFF:
|
||||
result = FALSE;
|
||||
break;
|
||||
|
||||
default:
|
||||
{
|
||||
char key[16];
|
||||
wchar_t *desc;
|
||||
sprintf (key, "VKEY_%02X", vKey);
|
||||
desc = GetString (key);
|
||||
if (desc == UnknownString)
|
||||
result = FALSE;
|
||||
else
|
||||
wcsncpy (keyName, desc, MAX_KEY_COMB_NAME_LEN);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
static BOOL ShortcutInUse (UINT vKeyCode, UINT modifiers, TCHOTKEY hotkeys[])
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < NBR_HOTKEYS; i++)
|
||||
{
|
||||
if (hotkeys[i].vKeyCode == vKeyCode && hotkeys[i].vKeyModifiers == modifiers)
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
void UnregisterAllHotkeys (HWND hwndDlg, TCHOTKEY hotkeys[])
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < NBR_HOTKEYS; i++)
|
||||
{
|
||||
if (hotkeys[i].vKeyCode != 0)
|
||||
UnregisterHotKey (hwndDlg, i);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BOOL RegisterAllHotkeys (HWND hwndDlg, TCHOTKEY hotkeys[])
|
||||
{
|
||||
BOOL result = TRUE;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < NBR_HOTKEYS; i++)
|
||||
{
|
||||
if (hotkeys[i].vKeyCode != 0
|
||||
&& !RegisterHotKey (hwndDlg, i, hotkeys[i].vKeyModifiers, hotkeys[i].vKeyCode))
|
||||
result = FALSE;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
static void DisplayHotkeyList (HWND hwndDlg)
|
||||
{
|
||||
LVITEMW item;
|
||||
HWND hList = GetDlgItem (hwndDlg, IDC_HOTKEY_LIST);
|
||||
int i;
|
||||
wchar_t ShortcutMod [MAX_KEY_COMB_NAME_LEN];
|
||||
wchar_t ShortcutFinal [MAX_KEY_COMB_NAME_LEN*2];
|
||||
wchar_t Shortcut [MAX_KEY_COMB_NAME_LEN];
|
||||
|
||||
SendMessage (hList, LVM_DELETEALLITEMS,0, (LPARAM)&item);
|
||||
|
||||
for (i = 0; i < NBR_HOTKEYS; i++)
|
||||
{
|
||||
memset (&item,0,sizeof(item));
|
||||
item.mask = LVIF_TEXT;
|
||||
item.iItem = i;
|
||||
item.iSubItem = 0;
|
||||
|
||||
switch (i)
|
||||
{
|
||||
|
||||
case HK_AUTOMOUNT_DEVICES:
|
||||
item.pszText = GetString ("HK_AUTOMOUNT_DEVICES");
|
||||
break;
|
||||
|
||||
case HK_DISMOUNT_ALL:
|
||||
item.pszText = GetString ("HK_DISMOUNT_ALL");
|
||||
break;
|
||||
|
||||
case HK_WIPE_CACHE:
|
||||
item.pszText = GetString ("HK_WIPE_CACHE");
|
||||
break;
|
||||
|
||||
case HK_DISMOUNT_ALL_AND_WIPE:
|
||||
item.pszText = GetString ("HK_DISMOUNT_ALL_AND_WIPE");
|
||||
break;
|
||||
|
||||
case HK_FORCE_DISMOUNT_ALL_AND_WIPE:
|
||||
item.pszText = GetString ("HK_FORCE_DISMOUNT_ALL_AND_WIPE");
|
||||
break;
|
||||
|
||||
case HK_FORCE_DISMOUNT_ALL_AND_WIPE_AND_EXIT:
|
||||
item.pszText = GetString ("HK_FORCE_DISMOUNT_ALL_AND_WIPE_AND_EXIT");
|
||||
break;
|
||||
|
||||
case HK_MOUNT_FAVORITE_VOLUMES:
|
||||
item.pszText = GetString ("HK_MOUNT_FAVORITE_VOLUMES");
|
||||
break;
|
||||
|
||||
case HK_SHOW_HIDE_MAIN_WINDOW:
|
||||
item.pszText = GetString ("HK_SHOW_HIDE_MAIN_WINDOW");
|
||||
break;
|
||||
|
||||
case HK_CLOSE_SECURITY_TOKEN_SESSIONS:
|
||||
item.pszText = GetString ("IDM_CLOSE_ALL_TOKEN_SESSIONS");
|
||||
break;
|
||||
|
||||
default:
|
||||
item.pszText = L"[?]";
|
||||
}
|
||||
|
||||
SendMessageW (hList,LVM_INSERTITEMW,0,(LPARAM)&item);
|
||||
|
||||
item.iSubItem = 1;
|
||||
wcscpy (Shortcut, L"");
|
||||
wcscpy (ShortcutMod, L"");
|
||||
|
||||
if (GetKeyName (tmpHotkeys[i].vKeyCode, Shortcut))
|
||||
{
|
||||
if (tmpHotkeys[i].vKeyModifiers & MOD_CONTROL)
|
||||
{
|
||||
wcscat (ShortcutMod, GetString ("VK_CONTROL"));
|
||||
wcscat (ShortcutMod, L"+");
|
||||
}
|
||||
|
||||
if (tmpHotkeys[i].vKeyModifiers & MOD_SHIFT)
|
||||
{
|
||||
wcscat (ShortcutMod, GetString ("VK_SHIFT"));
|
||||
wcscat (ShortcutMod, L"+");
|
||||
}
|
||||
|
||||
if (tmpHotkeys[i].vKeyModifiers & MOD_ALT)
|
||||
{
|
||||
wcscat (ShortcutMod, GetString ("VK_ALT"));
|
||||
wcscat (ShortcutMod, L"+");
|
||||
}
|
||||
|
||||
if (tmpHotkeys[i].vKeyModifiers & MOD_WIN)
|
||||
{
|
||||
wcscat (ShortcutMod, GetString ("VK_WIN"));
|
||||
wcscat (ShortcutMod, L"+");
|
||||
}
|
||||
|
||||
wsprintfW (ShortcutFinal, L"%s%s", ShortcutMod, Shortcut);
|
||||
item.pszText = ShortcutFinal;
|
||||
}
|
||||
else
|
||||
item.pszText = L"";
|
||||
|
||||
SendMessageW (hList, LVM_SETITEMW, 0, (LPARAM)&item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
BOOL CALLBACK HotkeysDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
HWND hList = GetDlgItem (hwndDlg, IDC_HOTKEY_LIST);
|
||||
HWND hwndMainDlg = hwndDlg;
|
||||
WORD lw = LOWORD (wParam);
|
||||
WORD hw = HIWORD (wParam);
|
||||
static BOOL bKeyScanOn;
|
||||
static BOOL bTPlaySoundOnSuccessfulHkDismount;
|
||||
static BOOL bTDisplayBalloonOnSuccessfulHkDismount;
|
||||
|
||||
while (GetParent (hwndMainDlg) != NULL)
|
||||
{
|
||||
hwndMainDlg = GetParent (hwndMainDlg);
|
||||
}
|
||||
|
||||
switch (msg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
LVCOLUMNW col;
|
||||
|
||||
bKeyScanOn = FALSE;
|
||||
nSelectedHotkeyId = -1;
|
||||
currentVKeyCode = 0;
|
||||
memcpy (tmpHotkeys, Hotkeys, sizeof(tmpHotkeys));
|
||||
|
||||
SendMessageW (hList,LVM_SETEXTENDEDLISTVIEWSTYLE,0,
|
||||
LVS_EX_FULLROWSELECT|LVS_EX_HEADERDRAGDROP|LVS_EX_LABELTIP
|
||||
);
|
||||
|
||||
memset (&col,0,sizeof(col));
|
||||
col.mask = LVCF_TEXT|LVCF_WIDTH|LVCF_SUBITEM|LVCF_FMT;
|
||||
col.pszText = GetString ("ACTION");
|
||||
col.cx = CompensateXDPI (341);
|
||||
col.fmt = LVCFMT_LEFT;
|
||||
SendMessageW (hList,LVM_INSERTCOLUMNW,0,(LPARAM)&col);
|
||||
|
||||
col.pszText = GetString ("SHORTCUT");
|
||||
col.cx = CompensateXDPI (190);
|
||||
col.fmt = LVCFMT_LEFT;
|
||||
SendMessageW (hList,LVM_INSERTCOLUMNW,1,(LPARAM)&col);
|
||||
|
||||
LocalizeDialog (hwndDlg, "IDD_HOTKEYS_DLG");
|
||||
|
||||
SetCheckBox (hwndDlg, IDC_HK_MOD_CTRL, TRUE);
|
||||
SetCheckBox (hwndDlg, IDC_HK_MOD_SHIFT, FALSE);
|
||||
SetCheckBox (hwndDlg, IDC_HK_MOD_ALT, TRUE);
|
||||
SetCheckBox (hwndDlg, IDC_HK_MOD_WIN, FALSE);
|
||||
|
||||
SetCheckBox (hwndDlg, IDC_HK_DISMOUNT_PLAY_SOUND, bPlaySoundOnSuccessfulHkDismount);
|
||||
SetCheckBox (hwndDlg, IDC_HK_DISMOUNT_BALLOON_TOOLTIP, bDisplayBalloonOnSuccessfulHkDismount);
|
||||
|
||||
bTPlaySoundOnSuccessfulHkDismount = bPlaySoundOnSuccessfulHkDismount;
|
||||
bTDisplayBalloonOnSuccessfulHkDismount = bDisplayBalloonOnSuccessfulHkDismount;
|
||||
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_HOTKEY_ASSIGN), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_HOTKEY_REMOVE), FALSE);
|
||||
|
||||
DisplayHotkeyList(hwndDlg);
|
||||
|
||||
SetTimer (hwndDlg, 0xfe, 10, NULL);
|
||||
return 1;
|
||||
}
|
||||
|
||||
case WM_TIMER:
|
||||
{
|
||||
if (nSelectedHotkeyId > -1)
|
||||
{
|
||||
wchar_t keyName [MAX_KEY_COMB_NAME_LEN];
|
||||
UINT tmpVKeyCode;
|
||||
|
||||
keyName[0] = 0;
|
||||
|
||||
ScanAndProcessKey (&tmpVKeyCode, &keyName[0]);
|
||||
|
||||
if (keyName[0] != 0)
|
||||
{
|
||||
currentVKeyCode = tmpVKeyCode;
|
||||
SetWindowTextW (GetDlgItem (hwndDlg, IDC_HOTKEY_KEY), keyName);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_HOTKEY_ASSIGN), TRUE);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
case WM_COMMAND:
|
||||
case WM_NOTIFY:
|
||||
|
||||
if (lw == IDC_HOTKEY_KEY && hw == EN_CHANGE)
|
||||
{
|
||||
if (!bKeyScanOn && nSelectedHotkeyId < 0 && GetWindowTextLengthW (GetDlgItem (hwndDlg, IDC_HOTKEY_KEY)))
|
||||
SetWindowTextW (GetDlgItem (hwndDlg, IDC_HOTKEY_KEY), L"");
|
||||
}
|
||||
|
||||
if (msg == WM_NOTIFY && wParam == IDC_HOTKEY_LIST)
|
||||
{
|
||||
if (((LPNMHDR) lParam)->code == LVN_ITEMACTIVATE
|
||||
|| ((LPNMHDR) lParam)->code == LVN_ITEMCHANGED && (((LPNMLISTVIEW) lParam)->uNewState & LVIS_FOCUSED))
|
||||
{
|
||||
LVITEM item;
|
||||
memset(&item,0,sizeof(item));
|
||||
nSelectedHotkeyId = ((LPNMLISTVIEW) lParam)->iItem;
|
||||
SetWindowTextW (GetDlgItem (hwndDlg, IDC_HOTKEY_KEY), GetString ("PRESS_A_KEY_TO_ASSIGN"));
|
||||
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_HOTKEY_REMOVE), (tmpHotkeys[nSelectedHotkeyId].vKeyCode > 0));
|
||||
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_HOTKEY_ASSIGN), FALSE);
|
||||
bKeyScanOn = TRUE;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (lw == IDC_HOTKEY_ASSIGN)
|
||||
{
|
||||
BOOL bOwnActiveShortcut = FALSE;
|
||||
|
||||
if (nSelectedHotkeyId >= 0 && currentVKeyCode != 0)
|
||||
{
|
||||
UINT modifiers = 0;
|
||||
if (GetCheckBox (hwndDlg, IDC_HK_MOD_CTRL))
|
||||
modifiers = MOD_CONTROL;
|
||||
|
||||
if (GetCheckBox (hwndDlg, IDC_HK_MOD_ALT))
|
||||
modifiers |= MOD_ALT;
|
||||
|
||||
if (GetCheckBox (hwndDlg, IDC_HK_MOD_SHIFT))
|
||||
modifiers |= MOD_SHIFT;
|
||||
|
||||
if (GetCheckBox (hwndDlg, IDC_HK_MOD_WIN))
|
||||
modifiers |= MOD_WIN;
|
||||
|
||||
// Check if it's not already assigned
|
||||
if (ShortcutInUse (currentVKeyCode, modifiers, tmpHotkeys))
|
||||
{
|
||||
Error ("SHORTCUT_ALREADY_IN_USE");
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Check for reserved system keys
|
||||
switch (currentVKeyCode)
|
||||
{
|
||||
case VK_F1:
|
||||
case VK_F12:
|
||||
/* F1 is help and F12 is reserved for use by the debugger at all times */
|
||||
if (modifiers == 0)
|
||||
{
|
||||
Error ("CANNOT_USE_RESERVED_KEY");
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
bOwnActiveShortcut = ShortcutInUse (currentVKeyCode, modifiers, Hotkeys);
|
||||
|
||||
// Test if the shortcut can be assigned without errors
|
||||
if (!bOwnActiveShortcut
|
||||
&& !RegisterHotKey (hwndDlg, nSelectedHotkeyId, modifiers, currentVKeyCode))
|
||||
{
|
||||
handleWin32Error(hwndDlg);
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!bOwnActiveShortcut && !UnregisterHotKey (hwndDlg, nSelectedHotkeyId))
|
||||
handleWin32Error(hwndDlg);
|
||||
|
||||
tmpHotkeys[nSelectedHotkeyId].vKeyCode = currentVKeyCode;
|
||||
tmpHotkeys[nSelectedHotkeyId].vKeyModifiers = modifiers;
|
||||
|
||||
SetWindowTextW (GetDlgItem (hwndDlg, IDC_HOTKEY_KEY), L"");
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_HOTKEY_ASSIGN), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_HOTKEY_REMOVE), FALSE);
|
||||
nSelectedHotkeyId = -1;
|
||||
bKeyScanOn = FALSE;
|
||||
}
|
||||
}
|
||||
DisplayHotkeyList(hwndDlg);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (lw == IDC_HOTKEY_REMOVE)
|
||||
{
|
||||
if (nSelectedHotkeyId >= 0)
|
||||
{
|
||||
tmpHotkeys[nSelectedHotkeyId].vKeyCode = 0;
|
||||
tmpHotkeys[nSelectedHotkeyId].vKeyModifiers = 0;
|
||||
SetWindowTextW (GetDlgItem (hwndDlg, IDC_HOTKEY_KEY), L"");
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_HOTKEY_ASSIGN), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_HOTKEY_REMOVE), FALSE);
|
||||
nSelectedHotkeyId = -1;
|
||||
bKeyScanOn = FALSE;
|
||||
DisplayHotkeyList(hwndDlg);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (lw == IDC_RESET_HOTKEYS)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < NBR_HOTKEYS; i++)
|
||||
{
|
||||
tmpHotkeys[i].vKeyCode = 0;
|
||||
tmpHotkeys[i].vKeyModifiers = 0;
|
||||
}
|
||||
SetWindowTextW (GetDlgItem (hwndDlg, IDC_HOTKEY_KEY), L"");
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_HOTKEY_ASSIGN), FALSE);
|
||||
EnableWindow (GetDlgItem (hwndDlg, IDC_HOTKEY_REMOVE), FALSE);
|
||||
nSelectedHotkeyId = -1;
|
||||
bKeyScanOn = FALSE;
|
||||
DisplayHotkeyList(hwndDlg);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (lw == IDC_HK_DISMOUNT_PLAY_SOUND)
|
||||
{
|
||||
bTPlaySoundOnSuccessfulHkDismount = GetCheckBox (hwndDlg, IDC_HK_DISMOUNT_PLAY_SOUND);
|
||||
}
|
||||
|
||||
if (lw == IDC_HK_DISMOUNT_BALLOON_TOOLTIP)
|
||||
{
|
||||
bTDisplayBalloonOnSuccessfulHkDismount = GetCheckBox (hwndDlg, IDC_HK_DISMOUNT_BALLOON_TOOLTIP);
|
||||
}
|
||||
|
||||
if (lw == IDCANCEL || lw == IDCLOSE)
|
||||
{
|
||||
KillTimer (hwndDlg, 0xfe);
|
||||
EndDialog (hwndDlg, IDCANCEL);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (lw == IDOK)
|
||||
{
|
||||
UnregisterAllHotkeys (hwndMainDlg, Hotkeys);
|
||||
memcpy (Hotkeys, tmpHotkeys, sizeof(Hotkeys));
|
||||
RegisterAllHotkeys (hwndMainDlg, Hotkeys);
|
||||
KillTimer (hwndDlg, 0xfe);
|
||||
bPlaySoundOnSuccessfulHkDismount = bTPlaySoundOnSuccessfulHkDismount;
|
||||
bDisplayBalloonOnSuccessfulHkDismount = bTDisplayBalloonOnSuccessfulHkDismount;
|
||||
|
||||
SaveSettings (hwndDlg);
|
||||
EndDialog (hwndDlg, IDCANCEL);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
||||
case WM_CLOSE:
|
||||
|
||||
KillTimer (hwndDlg, 0xfe);
|
||||
EndDialog (hwndDlg, IDCANCEL);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
48
src/Mount/Hotkeys.h
Normal file
48
src/Mount/Hotkeys.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
Copyright (c) 2005 TrueCrypt Developers Association. All rights reserved.
|
||||
|
||||
Governed by the TrueCrypt License 3.0 the full text of which is contained in
|
||||
the file License.txt included in TrueCrypt binary and source code distribution
|
||||
packages.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum
|
||||
{
|
||||
/* When adding/removing hot keys, update the following functions in Mount.c:
|
||||
DisplayHotkeyList()
|
||||
SaveSettings()
|
||||
LoadSettings()
|
||||
HandleHotKey() */
|
||||
|
||||
HK_AUTOMOUNT_DEVICES = 0,
|
||||
HK_CLOSE_SECURITY_TOKEN_SESSIONS,
|
||||
HK_DISMOUNT_ALL,
|
||||
HK_DISMOUNT_ALL_AND_WIPE,
|
||||
HK_FORCE_DISMOUNT_ALL_AND_WIPE,
|
||||
HK_FORCE_DISMOUNT_ALL_AND_WIPE_AND_EXIT,
|
||||
HK_MOUNT_FAVORITE_VOLUMES,
|
||||
HK_SHOW_HIDE_MAIN_WINDOW,
|
||||
HK_WIPE_CACHE,
|
||||
NBR_HOTKEYS
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
UINT vKeyCode;
|
||||
UINT vKeyModifiers;
|
||||
} TCHOTKEY;
|
||||
|
||||
extern TCHOTKEY Hotkeys [NBR_HOTKEYS];
|
||||
|
||||
BOOL CALLBACK HotkeysDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
|
||||
BOOL GetKeyName (UINT vKey, wchar_t *keyName);
|
||||
void UnregisterAllHotkeys (HWND hwndDlg, TCHOTKEY hotkeys[]);
|
||||
BOOL RegisterAllHotkeys (HWND hwndDlg, TCHOTKEY hotkeys[]);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
BIN
src/Mount/Logo_288dpi.bmp
Normal file
BIN
src/Mount/Logo_288dpi.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 49 KiB |
BIN
src/Mount/Logo_96dpi.bmp
Normal file
BIN
src/Mount/Logo_96dpi.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.5 KiB |
267
src/Mount/MainCom.cpp
Normal file
267
src/Mount/MainCom.cpp
Normal file
@@ -0,0 +1,267 @@
|
||||
/*
|
||||
Copyright (c) 2007-2010 TrueCrypt Developers Association. All rights reserved.
|
||||
|
||||
Governed by the TrueCrypt License 3.0 the full text of which is contained in
|
||||
the file License.txt included in TrueCrypt binary and source code distribution
|
||||
packages.
|
||||
*/
|
||||
|
||||
#include <atlcomcli.h>
|
||||
#include <atlconv.h>
|
||||
#include <windows.h>
|
||||
#include "BaseCom.h"
|
||||
#include "BootEncryption.h"
|
||||
#include "Dlgcode.h"
|
||||
#include "MainCom.h"
|
||||
#include "MainCom_h.h"
|
||||
#include "MainCom_i.c"
|
||||
#include "Mount.h"
|
||||
#include "Password.h"
|
||||
|
||||
using namespace TrueCrypt;
|
||||
|
||||
static volatile LONG ObjectCount = 0;
|
||||
|
||||
class TrueCryptMainCom : public ITrueCryptMainCom
|
||||
{
|
||||
|
||||
public:
|
||||
TrueCryptMainCom (DWORD messageThreadId) : RefCount (0), MessageThreadId (messageThreadId)
|
||||
{
|
||||
InterlockedIncrement (&ObjectCount);
|
||||
}
|
||||
|
||||
~TrueCryptMainCom ()
|
||||
{
|
||||
if (InterlockedDecrement (&ObjectCount) == 0)
|
||||
PostThreadMessage (MessageThreadId, WM_APP, 0, 0);
|
||||
}
|
||||
|
||||
virtual ULONG STDMETHODCALLTYPE AddRef ()
|
||||
{
|
||||
return InterlockedIncrement (&RefCount);
|
||||
}
|
||||
|
||||
virtual ULONG STDMETHODCALLTYPE Release ()
|
||||
{
|
||||
if (!InterlockedDecrement (&RefCount))
|
||||
{
|
||||
delete this;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return RefCount;
|
||||
}
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE QueryInterface (REFIID riid, void **ppvObject)
|
||||
{
|
||||
if (riid == IID_IUnknown || riid == IID_ITrueCryptMainCom)
|
||||
*ppvObject = this;
|
||||
else
|
||||
{
|
||||
*ppvObject = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
AddRef ();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
virtual void STDMETHODCALLTYPE AnalyzeKernelMiniDump (LONG_PTR hwndDlg)
|
||||
{
|
||||
MainDlg = (HWND) hwndDlg;
|
||||
::AnalyzeKernelMiniDump ((HWND) hwndDlg);
|
||||
}
|
||||
|
||||
virtual int STDMETHODCALLTYPE BackupVolumeHeader (LONG_PTR hwndDlg, BOOL bRequireConfirmation, BSTR lpszVolume)
|
||||
{
|
||||
USES_CONVERSION;
|
||||
MainDlg = (HWND) hwndDlg;
|
||||
return ::BackupVolumeHeader ((HWND) hwndDlg, bRequireConfirmation, CW2A (lpszVolume));
|
||||
}
|
||||
|
||||
virtual int STDMETHODCALLTYPE RestoreVolumeHeader (LONG_PTR hwndDlg, BSTR lpszVolume)
|
||||
{
|
||||
USES_CONVERSION;
|
||||
MainDlg = (HWND) hwndDlg;
|
||||
return ::RestoreVolumeHeader ((HWND) hwndDlg, CW2A (lpszVolume));
|
||||
}
|
||||
|
||||
virtual DWORD STDMETHODCALLTYPE CallDriver (DWORD ioctl, BSTR input, BSTR *output)
|
||||
{
|
||||
return BaseCom::CallDriver (ioctl, input, output);
|
||||
}
|
||||
|
||||
virtual int STDMETHODCALLTYPE ChangePassword (BSTR volumePath, Password *oldPassword, Password *newPassword, int pkcs5, LONG_PTR hWnd)
|
||||
{
|
||||
USES_CONVERSION;
|
||||
MainDlg = (HWND) hWnd;
|
||||
return ::ChangePwd (CW2A (volumePath), oldPassword, newPassword, pkcs5, (HWND) hWnd);
|
||||
}
|
||||
|
||||
virtual DWORD STDMETHODCALLTYPE CopyFile (BSTR sourceFile, BSTR destinationFile)
|
||||
{
|
||||
return BaseCom::CopyFile (sourceFile, destinationFile);
|
||||
}
|
||||
|
||||
virtual DWORD STDMETHODCALLTYPE DeleteFile (BSTR file)
|
||||
{
|
||||
return BaseCom::DeleteFile (file);
|
||||
}
|
||||
|
||||
virtual BOOL STDMETHODCALLTYPE IsPagingFileActive (BOOL checkNonWindowsPartitionsOnly)
|
||||
{
|
||||
return BaseCom::IsPagingFileActive (checkNonWindowsPartitionsOnly);
|
||||
}
|
||||
|
||||
virtual DWORD STDMETHODCALLTYPE ReadWriteFile (BOOL write, BOOL device, BSTR filePath, BSTR *bufferBstr, unsigned __int64 offset, unsigned __int32 size, DWORD *sizeDone)
|
||||
{
|
||||
return BaseCom::ReadWriteFile (write, device, filePath, bufferBstr, offset, size, sizeDone);
|
||||
}
|
||||
|
||||
virtual DWORD STDMETHODCALLTYPE RegisterFilterDriver (BOOL registerDriver, int filterType)
|
||||
{
|
||||
return BaseCom::RegisterFilterDriver (registerDriver, filterType);
|
||||
}
|
||||
|
||||
virtual DWORD STDMETHODCALLTYPE RegisterSystemFavoritesService (BOOL registerService)
|
||||
{
|
||||
return BaseCom::RegisterSystemFavoritesService (registerService);
|
||||
}
|
||||
|
||||
virtual DWORD STDMETHODCALLTYPE SetDriverServiceStartType (DWORD startType)
|
||||
{
|
||||
return BaseCom::SetDriverServiceStartType (startType);
|
||||
}
|
||||
|
||||
virtual DWORD STDMETHODCALLTYPE WriteLocalMachineRegistryDwordValue (BSTR keyPath, BSTR valueName, DWORD value)
|
||||
{
|
||||
return BaseCom::WriteLocalMachineRegistryDwordValue (keyPath, valueName, value);
|
||||
}
|
||||
|
||||
protected:
|
||||
DWORD MessageThreadId;
|
||||
LONG RefCount;
|
||||
};
|
||||
|
||||
|
||||
extern "C" BOOL ComServerMain ()
|
||||
{
|
||||
SetProcessShutdownParameters (0x100, 0);
|
||||
|
||||
TrueCryptFactory<TrueCryptMainCom> factory (GetCurrentThreadId ());
|
||||
DWORD cookie;
|
||||
|
||||
if (IsUacSupported ())
|
||||
UacElevated = TRUE;
|
||||
|
||||
if (CoRegisterClassObject (CLSID_TrueCryptMainCom, (LPUNKNOWN) &factory,
|
||||
CLSCTX_LOCAL_SERVER, REGCLS_SINGLEUSE, &cookie) != S_OK)
|
||||
return FALSE;
|
||||
|
||||
MSG msg;
|
||||
while (int r = GetMessage (&msg, NULL, 0, 0))
|
||||
{
|
||||
if (r == -1)
|
||||
return FALSE;
|
||||
|
||||
TranslateMessage (&msg);
|
||||
DispatchMessage (&msg);
|
||||
|
||||
if (msg.message == WM_APP
|
||||
&& ObjectCount < 1
|
||||
&& !factory.IsServerLocked ())
|
||||
break;
|
||||
}
|
||||
CoRevokeClassObject (cookie);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static BOOL ComGetInstance (HWND hWnd, ITrueCryptMainCom **tcServer)
|
||||
{
|
||||
return ComGetInstanceBase (hWnd, CLSID_TrueCryptMainCom, IID_ITrueCryptMainCom, (void **) tcServer);
|
||||
}
|
||||
|
||||
|
||||
ITrueCryptMainCom *GetElevatedInstance (HWND parent)
|
||||
{
|
||||
ITrueCryptMainCom *instance;
|
||||
|
||||
if (!ComGetInstance (parent, &instance))
|
||||
throw UserAbort (SRC_POS);
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
extern "C" void UacAnalyzeKernelMiniDump (HWND hwndDlg)
|
||||
{
|
||||
CComPtr<ITrueCryptMainCom> tc;
|
||||
|
||||
CoInitialize (NULL);
|
||||
|
||||
if (ComGetInstance (hwndDlg, &tc))
|
||||
{
|
||||
WaitCursor();
|
||||
tc->AnalyzeKernelMiniDump ((LONG_PTR) hwndDlg);
|
||||
NormalCursor();
|
||||
}
|
||||
|
||||
CoUninitialize ();
|
||||
}
|
||||
|
||||
|
||||
extern "C" int UacBackupVolumeHeader (HWND hwndDlg, BOOL bRequireConfirmation, char *lpszVolume)
|
||||
{
|
||||
CComPtr<ITrueCryptMainCom> tc;
|
||||
int r;
|
||||
|
||||
CoInitialize (NULL);
|
||||
|
||||
if (ComGetInstance (hwndDlg, &tc))
|
||||
r = tc->BackupVolumeHeader ((LONG_PTR) hwndDlg, bRequireConfirmation, CComBSTR (lpszVolume));
|
||||
else
|
||||
r = -1;
|
||||
|
||||
CoUninitialize ();
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
extern "C" int UacRestoreVolumeHeader (HWND hwndDlg, char *lpszVolume)
|
||||
{
|
||||
CComPtr<ITrueCryptMainCom> tc;
|
||||
int r;
|
||||
|
||||
CoInitialize (NULL);
|
||||
|
||||
if (ComGetInstance (hwndDlg, &tc))
|
||||
r = tc->RestoreVolumeHeader ((LONG_PTR) hwndDlg, CComBSTR (lpszVolume));
|
||||
else
|
||||
r = -1;
|
||||
|
||||
CoUninitialize ();
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
extern "C" int UacChangePwd (char *lpszVolume, Password *oldPassword, Password *newPassword, int pkcs5, HWND hwndDlg)
|
||||
{
|
||||
CComPtr<ITrueCryptMainCom> tc;
|
||||
int r;
|
||||
|
||||
if (ComGetInstance (hwndDlg, &tc))
|
||||
{
|
||||
WaitCursor ();
|
||||
r = tc->ChangePassword (CComBSTR (lpszVolume), oldPassword, newPassword, pkcs5, (LONG_PTR) hwndDlg);
|
||||
NormalCursor ();
|
||||
}
|
||||
else
|
||||
r = -1;
|
||||
|
||||
return r;
|
||||
}
|
||||
32
src/Mount/MainCom.h
Normal file
32
src/Mount/MainCom.h
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
Copyright (c) 2007-2010 TrueCrypt Developers Association. All rights reserved.
|
||||
|
||||
Governed by the TrueCrypt License 3.0 the full text of which is contained in
|
||||
the file License.txt included in TrueCrypt binary and source code distribution
|
||||
packages.
|
||||
*/
|
||||
|
||||
#ifndef TC_HEADER_MAIN_COM
|
||||
#define TC_HEADER_MAIN_COM
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include "MainCom_h.h"
|
||||
ITrueCryptMainCom *GetElevatedInstance (HWND parent);
|
||||
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
BOOL ComServerMain ();
|
||||
void UacAnalyzeKernelMiniDump (HWND hwndDlg);
|
||||
int UacBackupVolumeHeader (HWND hwndDlg, BOOL bRequireConfirmation, char *lpszVolume);
|
||||
int UacRestoreVolumeHeader (HWND hwndDlg, char *lpszVolume);
|
||||
int UacChangePwd (char *lpszVolume, Password *oldPassword, Password *newPassword, int pkcs5, HWND hwndDlg);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // TC_HEADER_MAIN_COM
|
||||
50
src/Mount/MainCom.idl
Normal file
50
src/Mount/MainCom.idl
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
Copyright (c) 2007-2010 TrueCrypt Developers Association. All rights reserved.
|
||||
|
||||
Governed by the TrueCrypt License 3.0 the full text of which is contained in
|
||||
the file License.txt included in TrueCrypt binary and source code distribution
|
||||
packages.
|
||||
*/
|
||||
|
||||
import "wtypes.idl";
|
||||
import "..\Common\Password.h";
|
||||
|
||||
[
|
||||
uuid(1770F56C-7881-4591-A179-79B8001C7D42),
|
||||
helpstring("TrueCrypt Main UAC Support Library"),
|
||||
version(2.4) // Update ComSetup.cpp when changing version number
|
||||
]
|
||||
library TrueCryptMainCom
|
||||
{
|
||||
[
|
||||
uuid(252C9DE6-D4B9-4A59-8A10-9CA73217B3D0),
|
||||
object,
|
||||
oleautomation,
|
||||
helpstring("TrueCrypt Main UAC Support Interface")
|
||||
]
|
||||
interface ITrueCryptMainCom : IUnknown
|
||||
{
|
||||
void AnalyzeKernelMiniDump (LONG_PTR hwndDlg);
|
||||
int BackupVolumeHeader (LONG_PTR hwndDlg, BOOL bRequireConfirmation, BSTR lpszVolume);
|
||||
DWORD CallDriver (DWORD ioctl, BSTR input, BSTR *output);
|
||||
int ChangePassword (BSTR volumePath, Password *oldPassword, Password *newPassword, int pkcs5, LONG_PTR hWnd);
|
||||
DWORD CopyFile (BSTR sourceFile, BSTR destinationFile);
|
||||
DWORD DeleteFile (BSTR file);
|
||||
BOOL IsPagingFileActive (BOOL checkNonWindowsPartitionsOnly);
|
||||
DWORD ReadWriteFile (BOOL write, BOOL device, BSTR filePath, BSTR *bufferBstr, unsigned __int64 offset, unsigned __int32 size, DWORD *sizeDone);
|
||||
DWORD RegisterFilterDriver (BOOL registerDriver, int filterType);
|
||||
DWORD RegisterSystemFavoritesService (BOOL registerService);
|
||||
int RestoreVolumeHeader (LONG_PTR hwndDlg, BSTR lpszVolume);
|
||||
DWORD SetDriverServiceStartType (DWORD startType);
|
||||
DWORD WriteLocalMachineRegistryDwordValue (BSTR keyPath, BSTR valueName, DWORD value);
|
||||
};
|
||||
|
||||
[
|
||||
uuid(CECBC0EE-78D9-41E6-BCF1-BC222BB224BA),
|
||||
helpstring("TrueCrypt Main UAC Support Coclass")
|
||||
]
|
||||
coclass TrueCryptMainCom
|
||||
{
|
||||
[default] interface ITrueCryptMainCom;
|
||||
}
|
||||
}
|
||||
8999
src/Mount/Mount.c
Normal file
8999
src/Mount/Mount.c
Normal file
File diff suppressed because it is too large
Load Diff
115
src/Mount/Mount.h
Normal file
115
src/Mount/Mount.h
Normal file
@@ -0,0 +1,115 @@
|
||||
/*
|
||||
Legal Notice: Some portions of the source code contained in this file were
|
||||
derived from the source code of Encryption for the Masses 2.02a, which is
|
||||
Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License
|
||||
Agreement for Encryption for the Masses'. Modifications and additions to
|
||||
the original source code (contained in this file) and all other portions
|
||||
of this file are Copyright (c) 2003-2010 TrueCrypt Developers Association
|
||||
and are governed by the TrueCrypt License 3.0 the full text of which is
|
||||
contained in the file License.txt included in TrueCrypt binary and source
|
||||
code distribution packages. */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include "Favorites.h"
|
||||
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum mount_list_item_types
|
||||
{
|
||||
TC_MLIST_ITEM_FREE = 0,
|
||||
TC_MLIST_ITEM_NONSYS_VOL,
|
||||
TC_MLIST_ITEM_SYS_PARTITION,
|
||||
TC_MLIST_ITEM_SYS_DRIVE
|
||||
};
|
||||
|
||||
#define TC_MAIN_WINDOW_FLAG_ADMIN_PRIVILEGES 0x1
|
||||
|
||||
#define TRAYICON_MENU_DRIVE_OFFSET 9000
|
||||
#define TC_FAVORITE_MENU_CMD_ID_OFFSET 10000
|
||||
#define TC_FAVORITE_MENU_CMD_ID_OFFSET_END (TC_FAVORITE_MENU_CMD_ID_OFFSET + 1000)
|
||||
|
||||
#define WM_COPY_SET_VOLUME_NAME "VNAM"
|
||||
|
||||
#define ENC_SYSDRIVE_PSEUDO_DRIVE_LETTER ('A' - 1)
|
||||
|
||||
/* Password Change dialog modes */
|
||||
enum
|
||||
{
|
||||
PCDM_CHANGE_PASSWORD = 0,
|
||||
PCDM_CHANGE_PKCS5_PRF,
|
||||
PCDM_ADD_REMOVE_VOL_KEYFILES,
|
||||
PCDM_REMOVE_ALL_KEYFILES_FROM_VOL
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
BOOL bHidVolDamagePrevReported[26];
|
||||
} VOLUME_NOTIFICATIONS_LIST;
|
||||
|
||||
|
||||
extern VOLUME_NOTIFICATIONS_LIST VolumeNotificationsList;
|
||||
|
||||
extern BOOL bEnableBkgTask;
|
||||
extern BOOL bCloseBkgTaskWhenNoVolumes;
|
||||
extern BOOL bPlaySoundOnSuccessfulHkDismount;
|
||||
extern BOOL bDisplayBalloonOnSuccessfulHkDismount;
|
||||
extern BOOL bExplore;
|
||||
|
||||
static void localcleanup ( void );
|
||||
void EndMainDlg ( HWND hwndDlg );
|
||||
void EnableDisableButtons ( HWND hwndDlg );
|
||||
BOOL VolumeSelected (HWND hwndDlg );
|
||||
void LoadSettings ( HWND hwndDlg );
|
||||
void SaveSettings ( HWND hwndDlg );
|
||||
BOOL SelectItem ( HWND hTree , char nLetter );
|
||||
void LoadDriveLetters ( HWND hTree, int drive );
|
||||
BOOL CALLBACK PasswordChangeDlgProc ( HWND hwndDlg , UINT msg , WPARAM wParam , LPARAM lParam );
|
||||
BOOL CALLBACK PasswordDlgProc ( HWND hwndDlg , UINT msg , WPARAM wParam , LPARAM lParam );
|
||||
BOOL CALLBACK MountOptionsDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
|
||||
void BuildTree ( HWND hTree );
|
||||
LPARAM GetSelectedLong ( HWND hTree );
|
||||
LPARAM GetItemLong ( HWND hTree, int itemNo );
|
||||
BOOL CALLBACK CommandHelpDlgProc ( HWND hwndDlg , UINT msg , WPARAM wParam , LPARAM lParam );
|
||||
BOOL CALLBACK MainDialogProc ( HWND hwndDlg , UINT uMsg , WPARAM wParam , LPARAM lParam );
|
||||
void ExtractCommandLine ( HWND hwndDlg , char *lpszCommandLine );
|
||||
static void WipeCache (HWND hwndDlg, BOOL silent);
|
||||
void OpenVolumeExplorerWindow (int driveNo);
|
||||
BOOL TaskBarIconAdd (HWND hwnd);
|
||||
BOOL TaskBarIconRemove (HWND hwnd);
|
||||
BOOL TaskBarIconChange (HWND hwnd, int iconId);
|
||||
void DismountIdleVolumes ();
|
||||
static void SaveDefaultKeyFilesParam (void);
|
||||
static BOOL Dismount (HWND hwndDlg, int nDosDriveNo);
|
||||
static BOOL DismountAll (HWND hwndDlg, BOOL forceUnmount, BOOL interact, int dismountMaxRetries, int dismountAutoRetryDelay);
|
||||
static void KeyfileDefaultsDlg (HWND hwndDlg);
|
||||
static void HandleHotKey (HWND hwndDlg, WPARAM wParam);
|
||||
static BOOL CheckMountList ();
|
||||
int GetCipherBlockSizeByDriveNo (int nDosDriveNo);
|
||||
int GetModeOfOperationByDriveNo (int nDosDriveNo);
|
||||
void ChangeMainWindowVisibility ();
|
||||
void LaunchVolCreationWizard (HWND hwndDlg);
|
||||
BOOL WholeSysDriveEncryption (BOOL bSilent);
|
||||
BOOL CheckSysEncMountWithoutPBA (const char *devicePath, BOOL quiet);
|
||||
BOOL TCBootLoaderOnInactiveSysEncDrive (void);
|
||||
void CreateRescueDisk (void);
|
||||
int BackupVolumeHeader (HWND hwndDlg, BOOL bRequireConfirmation, char *lpszVolume);
|
||||
int RestoreVolumeHeader (HWND hwndDlg, char *lpszVolume);
|
||||
void SecurityTokenPreferencesDialog (HWND hwndDlg);
|
||||
static BOOL CALLBACK PerformanceSettingsDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
|
||||
static BOOL CALLBACK BootLoaderPreferencesDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
|
||||
void MountSelectedVolume (HWND hwndDlg, BOOL mountWithOptions);
|
||||
uint32 ReadDriverConfigurationFlags ();
|
||||
void AnalyzeKernelMiniDump (HWND hwndDlg);
|
||||
void HookMouseWheel (HWND hwndDlg, UINT ctrlId);
|
||||
static BOOL HandleDriveListMouseWheelEvent (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL bListMustBePointed);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
void SetDriverConfigurationFlag (uint32 flag, BOOL state);
|
||||
BOOL MountFavoriteVolumes (BOOL systemFavorites = FALSE, BOOL logOnMount = FALSE, BOOL hotKeyMount = FALSE, const TrueCrypt::FavoriteVolume &favoriteVolumeToMount = TrueCrypt::FavoriteVolume());
|
||||
BOOL GetExecutableImageInformation (const string &path, string &version, string &description, string &companyName, string &productName);
|
||||
|
||||
#endif
|
||||
21
src/Mount/Mount.manifest
Normal file
21
src/Mount/Mount.manifest
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
<asmv3:application>
|
||||
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
|
||||
<dpiAware>true</dpiAware>
|
||||
</asmv3:windowsSettings>
|
||||
</asmv3:application>
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
|
||||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
|
||||
</application>
|
||||
</compatibility>
|
||||
</assembly>
|
||||
635
src/Mount/Mount.rc
Normal file
635
src/Mount/Mount.rc
Normal file
@@ -0,0 +1,635 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
#include "..\\common\\resource.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// HEADER
|
||||
//
|
||||
|
||||
IDR_MOUNT_RSRC_HEADER HEADER "resource.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TYPELIB
|
||||
//
|
||||
|
||||
IDR_MOUNT_TLB TYPELIB "Mount.tlb"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_PREFERENCES_DLG DIALOGEX 0, 0, 336, 282
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "TrueCrypt - Preferences"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
CONTROL "Mount volumes as read-only",IDC_PREF_MOUNT_READONLY,
|
||||
"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,11,11,150,16
|
||||
CONTROL "Mount volumes as removable media",IDC_PREF_MOUNT_REMOVABLE,
|
||||
"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,162,11,165,16
|
||||
CONTROL "Enabled",IDC_PREF_BKG_TASK_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,44,111,10
|
||||
CONTROL "Exit when there are no mounted volumes",IDC_CLOSE_BKG_TASK_WHEN_NOVOL,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,140,44,188,10
|
||||
CONTROL "Start TrueCrypt Background Task",IDC_PREF_LOGON_START,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,75,126,10
|
||||
CONTROL "Mount all device-hosted TrueCrypt volumes",IDC_PREF_LOGON_MOUNT_DEVICES,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,140,75,188,10
|
||||
CONTROL "User logs off",IDC_PREF_DISMOUNT_LOGOFF,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,81,104,114,11
|
||||
CONTROL "Entering power saving mode",IDC_PREF_DISMOUNT_POWERSAVING,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,197,109,130,11
|
||||
CONTROL "Screen saver is launched",IDC_PREF_DISMOUNT_SCREENSAVER,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,81,115,114,10
|
||||
CONTROL "Auto-dismount volume after no data has been read/written to it for",IDC_PREF_DISMOUNT_INACTIVE,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,128,246,11
|
||||
EDITTEXT IDC_PREF_DISMOUNT_INACTIVE_TIME,258,127,27,12,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT
|
||||
CONTROL "Force auto-dismount even if volume contains open files or directories",IDC_PREF_FORCE_AUTO_DISMOUNT,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,141,294,10
|
||||
CONTROL "Open Explorer window for successfully mounted volume",IDC_PREF_OPEN_EXPLORER,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,171,316,11
|
||||
CONTROL "Use a different taskbar icon when there are mounted volumes",IDC_PREF_USE_DIFF_TRAY_ICON_IF_VOL_MOUNTED,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,184,314,10
|
||||
CONTROL "Preserve modification timestamp of file containers",IDC_PRESERVE_TIMESTAMPS,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,196,316,10
|
||||
CONTROL "Cache passwords in driver memory",IDC_PREF_CACHE_PASSWORDS,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,227,146,11
|
||||
CONTROL "Wipe cached passwords on exit",IDC_PREF_WIPE_CACHE_ON_EXIT,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,162,227,165,11
|
||||
CONTROL "Wipe cached passwords on auto-dismount",IDC_PREF_WIPE_CACHE_ON_AUTODISMOUNT,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,239,296,11
|
||||
PUSHBUTTON "More Settings...",IDC_MORE_SETTINGS,5,262,85,14
|
||||
DEFPUSHBUTTON "OK",IDOK,225,262,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,281,262,50,14
|
||||
GROUPBOX "Windows",IDT_WINDOWS_RELATED_SETTING,4,160,328,52
|
||||
GROUPBOX "Default Mount Options",IDT_DEFAULT_MOUNT_OPTIONS,4,3,328,26
|
||||
GROUPBOX "TrueCrypt Background Task",IDT_TASKBAR_ICON,4,33,328,26
|
||||
GROUPBOX "Auto-Dismount",IDT_AUTO_DISMOUNT,4,94,328,62
|
||||
LTEXT "minutes",IDT_MINUTES,289,129,39,10
|
||||
LTEXT "Dismount all when:",IDT_AUTO_DISMOUNT_ON,9,110,71,17
|
||||
GROUPBOX "Password Cache",IDT_PW_CACHE_OPTIONS,4,216,328,39
|
||||
GROUPBOX "Actions to perform upon logon to Windows",IDT_LOGON,4,63,328,28
|
||||
END
|
||||
|
||||
IDD_VOLUME_PROPERTIES DIALOGEX 60, 30, 284, 186
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "TrueCrypt Volume Properties"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,114,166,55,14
|
||||
CONTROL "",IDC_VOLUME_PROPERTIES_LIST,"SysListView32",LVS_REPORT | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,7,6,269,154
|
||||
END
|
||||
|
||||
IDD_PASSWORDCHANGE_DLG DIALOGEX 0, 0, 316, 162
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Change Password or Keyfiles"
|
||||
CLASS "CustomDlg"
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
EDITTEXT IDC_OLD_PASSWORD,89,14,147,13,ES_PASSWORD | ES_AUTOHSCROLL
|
||||
CONTROL "Use keyfiles",IDC_ENABLE_KEYFILES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,34,86,10
|
||||
PUSHBUTTON "Keyfiles...",IDC_KEYFILES,177,32,59,14
|
||||
CONTROL "Display password",IDC_SHOW_PASSWORD_CHPWD_ORI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,46,138,10,WS_EX_TRANSPARENT
|
||||
EDITTEXT IDC_PASSWORD,89,74,147,13,ES_PASSWORD | ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_VERIFY,89,90,147,13,ES_PASSWORD | ES_AUTOHSCROLL
|
||||
CONTROL "Use keyfiles",IDC_ENABLE_NEW_KEYFILES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,109,86,11
|
||||
PUSHBUTTON "Keyfiles...",IDC_NEW_KEYFILES,177,107,59,14
|
||||
CONTROL "Display password",IDC_SHOW_PASSWORD_CHPWD_NEW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,121,139,11,WS_EX_TRANSPARENT
|
||||
COMBOBOX IDC_PKCS5_PRF_ID,89,136,91,90,CBS_DROPDOWNLIST | WS_TABSTOP
|
||||
DEFPUSHBUTTON "OK",IDOK,251,7,59,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,251,24,59,14
|
||||
RTEXT "Password:",IDT_PASSWORD,12,16,72,8
|
||||
RTEXT "Password:",IDT_NEW_PASSWORD,8,77,76,8
|
||||
RTEXT "Confirm Password:",IDT_CONFIRM_PASSWORD,9,93,75,16
|
||||
RTEXT "PKCS-5 PRF:",IDT_PKCS5_PRF,9,137,74,10,SS_CENTERIMAGE
|
||||
GROUPBOX "Current",IDT_CURRENT,6,3,238,58
|
||||
GROUPBOX "New",IDT_NEW,6,63,238,93
|
||||
END
|
||||
|
||||
IDD_MOUNT_DLG DIALOGEX 0, 0, 375, 271
|
||||
STYLE DS_SETFONT | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "TrueCrypt"
|
||||
MENU IDR_MENU
|
||||
CLASS "CustomDlg"
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
CONTROL "",IDC_DRIVELIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,8,5,360,135
|
||||
PUSHBUTTON "&Create Volume",IDC_CREATE_VOLUME,16,159,84,14
|
||||
PUSHBUTTON "&Volume Properties...",IDC_VOLUME_PROPERTIES,146,159,84,14
|
||||
PUSHBUTTON "&Wipe Cache",IDC_WIPE_CACHE,276,159,84,14
|
||||
COMBOBOX IDC_VOLUME,56,192,212,74,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "&Never save history",IDC_NO_HISTORY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,56,207,122,10
|
||||
PUSHBUTTON "Volume &Tools...",IDC_VOLUME_TOOLS,184,211,84,14
|
||||
PUSHBUTTON "Select &File...",IDC_SELECT_FILE,276,192,84,14
|
||||
PUSHBUTTON "Select D&evice...",IDC_SELECT_DEVICE,276,211,84,14
|
||||
DEFPUSHBUTTON "OK",IDOK,8,243,84,18,WS_GROUP
|
||||
PUSHBUTTON "&Auto-Mount Devices",IDC_MOUNTALL,100,243,84,18
|
||||
PUSHBUTTON "Di&smount All",IDC_UNMOUNTALL,192,243,84,18,WS_GROUP
|
||||
PUSHBUTTON "E&xit",IDC_EXIT,284,243,84,18,WS_GROUP
|
||||
CONTROL 112,IDC_LOGO,"Static",SS_BITMAP | SS_NOTIFY | WS_BORDER,16,192,27,31
|
||||
GROUPBOX "Volume",IDT_VOLUME,8,179,360,53
|
||||
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,2,0,372,147
|
||||
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,282,242,88,20
|
||||
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,190,242,88,20
|
||||
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,6,242,88,20
|
||||
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,98,242,88,20
|
||||
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,2,151,372,119
|
||||
END
|
||||
|
||||
IDD_PASSWORD_DLG DIALOGEX 0, 0, 280, 68
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION
|
||||
CAPTION "Enter TrueCrypt Volume Password"
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
EDITTEXT IDC_PASSWORD,48,8,153,14,ES_PASSWORD | ES_AUTOHSCROLL
|
||||
CONTROL "Cache passwords and keyfil&es in memory",IDC_CACHE,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,52,27,153,10
|
||||
CONTROL "&Display password",IDC_SHOW_PASSWORD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,52,40,83,10
|
||||
CONTROL "U&se keyfiles",IDC_KEYFILES_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,52,52,83,11
|
||||
PUSHBUTTON "&Keyfiles...",IDC_KEY_FILES,137,49,64,14
|
||||
PUSHBUTTON "Mount Opti&ons...",IDC_MOUNT_OPTIONS,208,49,64,14
|
||||
DEFPUSHBUTTON "OK",IDOK,208,8,64,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,208,25,64,14
|
||||
RTEXT "Password:",IDT_PASSWORD,0,10,46,19
|
||||
END
|
||||
|
||||
IDD_TRAVELER_DLG DIALOGEX 0, 0, 300, 269
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "TrueCrypt Traveler Disk Setup"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
EDITTEXT IDC_DIRECTORY,17,29,205,13,ES_AUTOHSCROLL
|
||||
PUSHBUTTON "Browse...",IDC_BROWSE_DIRS,228,28,57,14
|
||||
CONTROL "Include TrueCrypt Volume Creation Wizard",IDC_COPY_WIZARD,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,48,258,10
|
||||
CONTROL "Do nothing",IDC_AUTORUN_DISABLE,"Button",BS_AUTORADIOBUTTON,15,97,262,10
|
||||
CONTROL "&Start TrueCrypt",IDC_AUTORUN_START,"Button",BS_AUTORADIOBUTTON,15,108,262,11
|
||||
CONTROL "&Auto-mount TrueCrypt volume (specified below)",IDC_AUTORUN_MOUNT,
|
||||
"Button",BS_AUTORADIOBUTTON,15,120,262,11
|
||||
EDITTEXT IDC_VOLUME_NAME,21,157,194,13,ES_AUTOHSCROLL | WS_DISABLED
|
||||
PUSHBUTTON "Browse...",IDC_BROWSE_FILES,221,156,57,14,WS_DISABLED
|
||||
COMBOBOX IDC_DRIVELIST,120,175,96,69,CBS_DROPDOWNLIST | WS_DISABLED | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "Open &Explorer window for mounted volume",IDC_TRAVEL_OPEN_EXPLORER,
|
||||
"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,22,193,256,10
|
||||
CONTROL "Mount volume as read-&only",IDC_MOUNT_READONLY,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,22,206,256,10
|
||||
CONTROL "&Cache password in driver memory",IDC_TRAV_CACHE_PASSWORDS,
|
||||
"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,22,219,256,10
|
||||
DEFPUSHBUTTON "Create",IDC_CREATE,173,249,57,14
|
||||
PUSHBUTTON "Close",IDCLOSE,236,249,57,14
|
||||
GROUPBOX "File Settings",IDT_FILE_SETTINGS,6,7,287,59
|
||||
GROUPBOX "AutoRun Configuration (autorun.inf)",IDT_AUTORUN,5,70,288,172
|
||||
LTEXT "TrueCrypt volume to mount (relative to traveler disk root):",IDT_TRAVELER_MOUNT,21,147,248,8,WS_DISABLED
|
||||
RTEXT "Mount volume as drive letter:",IDT_MOUNT_LETTER,18,177,99,8,WS_DISABLED
|
||||
LTEXT "Create traveler disk files at (traveler disk root directory):",IDT_TRAVEL_ROOT,18,19,259,8
|
||||
GROUPBOX "Mount Settings",IDT_MOUNT_SETTINGS,13,134,272,100,WS_DISABLED
|
||||
LTEXT "Upon insertion of traveler disk: ",IDT_TRAVEL_INSERTION,13,84,263,8
|
||||
END
|
||||
|
||||
IDD_HOTKEYS_DLG DIALOGEX 0, 0, 381, 239
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "TrueCrypt - System-Wide Hot Keys"
|
||||
CLASS "CustomDlg"
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
CONTROL "",IDC_HOTKEY_LIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,7,7,367,93
|
||||
EDITTEXT IDC_HOTKEY_KEY,108,121,190,13,ES_AUTOHSCROLL
|
||||
PUSHBUTTON "Assign",IDC_HOTKEY_ASSIGN,304,121,59,14
|
||||
CONTROL "Ctrl",IDC_HK_MOD_CTRL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,109,139,46,10,WS_EX_TRANSPARENT
|
||||
CONTROL "Shift",IDC_HK_MOD_SHIFT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,162,139,49,10,WS_EX_TRANSPARENT
|
||||
CONTROL "Alt",IDC_HK_MOD_ALT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,216,139,43,10,WS_EX_TRANSPARENT
|
||||
CONTROL "Win",IDC_HK_MOD_WIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,266,139,34,10,WS_EX_TRANSPARENT
|
||||
PUSHBUTTON "Remove",IDC_HOTKEY_REMOVE,304,139,59,14
|
||||
CONTROL "Play system notification sound after successful hot-key dismount",IDC_HK_DISMOUNT_PLAY_SOUND,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,182,348,10
|
||||
CONTROL "Display balloon tooltip after successful hot-key dismount",IDC_HK_DISMOUNT_BALLOON_TOOLTIP,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,194,351,10,WS_EX_TRANSPARENT
|
||||
DEFPUSHBUTTON "OK",IDOK,249,218,59,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,315,218,59,14
|
||||
PUSHBUTTON "Reset",IDC_RESET_HOTKEYS,7,218,59,14
|
||||
RTEXT "Key to assign:",IDT_HOTKEY_KEY,15,123,86,8
|
||||
GROUPBOX "Hot Key Options",IDT_DISMOUNT_ACTION,7,169,367,42
|
||||
GROUPBOX "Shortcut",IDT_ASSIGN_HOTKEY,7,108,367,53
|
||||
END
|
||||
|
||||
IDD_TOKEN_PREFERENCES DIALOGEX 0, 0, 316, 199
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "TrueCrypt - Security Token Preferences"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
EDITTEXT IDC_PKCS11_MODULE,16,23,204,13,ES_AUTOHSCROLL
|
||||
PUSHBUTTON "Select &Library...",IDC_SELECT_PKCS11_MODULE,226,22,75,14
|
||||
PUSHBUTTON "Auto-&Detect Library",IDC_AUTO_DETECT_PKCS11_MODULE,16,41,112,14
|
||||
CONTROL "&Close token session (log out) after a volume is successfully mounted",IDC_CLOSE_TOKEN_SESSION_AFTER_MOUNT,
|
||||
"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,16,154,284,9
|
||||
DEFPUSHBUTTON "OK",IDOK,205,178,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,259,178,50,14
|
||||
GROUPBOX "PKCS #11 Library Path",IDT_PKCS11_LIB_PATH,7,7,302,129
|
||||
GROUPBOX "Security Options",IDT_SECURITY_OPTIONS,7,140,302,30
|
||||
LTEXT "",IDT_PKCS11_LIB_HELP,16,63,286,65
|
||||
END
|
||||
|
||||
IDD_SYSENC_SETTINGS DIALOGEX 0, 0, 370, 242
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "TrueCrypt - System Encryption Settings"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
CONTROL "Do not &show any texts in the pre-boot authentication screen (except the below custom message)",IDC_DISABLE_BOOT_LOADER_OUTPUT,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,22,339,9
|
||||
EDITTEXT IDC_CUSTOM_BOOT_LOADER_MESSAGE,18,52,216,14,ES_AUTOHSCROLL
|
||||
CONTROL "&Cache pre-boot authentication password in driver memory (for mounting of non-system volumes)",IDC_BOOT_LOADER_CACHE_PASSWORD,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,178,339,10
|
||||
CONTROL "Allow pre-boot &authentication to be bypassed by pressing the Esc key (enables boot manager)",IDC_ALLOW_ESC_PBA_BYPASS,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,193,340,10
|
||||
DEFPUSHBUTTON "OK",IDOK,257,220,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,313,220,50,14
|
||||
LTEXT "Display this custom message in the pre-boot authentication screen (24 characters maximum):",IDT_CUSTOM_BOOT_LOADER_MESSAGE,18,41,337,8
|
||||
GROUPBOX "Boot Loader Screen Options",IDT_BOOT_LOADER_SCREEN_OPTIONS,8,7,355,150
|
||||
GROUPBOX "Security Options",IDT_SECURITY_OPTIONS,8,163,355,49
|
||||
LTEXT "",IDC_CUSTOM_BOOT_LOADER_MESSAGE_HELP,18,74,337,73
|
||||
END
|
||||
|
||||
IDD_PERFORMANCE_SETTINGS DIALOGEX 0, 0, 370, 206
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "TrueCrypt - Performance Options"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
CONTROL "",IDC_HW_AES_SUPPORTED_BY_CPU,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,294,21,57,12,WS_EX_CLIENTEDGE
|
||||
CONTROL "Accelerate AES encryption/decryption by using the AES instructions of the processor (if available)",IDC_ENABLE_HARDWARE_ENCRYPTION,
|
||||
"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,18,41,340,17
|
||||
LTEXT "More information",IDC_MORE_INFO_ON_HW_ACCELERATION,18,61,165,10,SS_NOTIFY
|
||||
CONTROL "Do not use the following number of processors for encryption/decryption:",IDC_LIMIT_ENC_THREAD_POOL,
|
||||
"Button",BS_AUTOCHECKBOX | BS_TOP | WS_TABSTOP,18,103,283,11
|
||||
COMBOBOX IDC_ENCRYPTION_FREE_CPU_COUNT,304,101,48,51,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "More information",IDC_MORE_INFO_ON_THREAD_BASED_PARALLELIZATION,18,159,165,10,SS_NOTIFY
|
||||
PUSHBUTTON "&Benchmark",IDC_BENCHMARK,7,185,59,14
|
||||
DEFPUSHBUTTON "OK",IDOK,257,185,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,313,185,50,14
|
||||
LTEXT "Processor (CPU) in this computer supports hardware acceleration for AES:",IDT_HW_AES_SUPPORTED_BY_CPU,18,23,273,9
|
||||
GROUPBOX "Hardware Acceleration",IDT_ACCELERATION_OPTIONS,7,6,355,74
|
||||
GROUPBOX "Thread-Based Parallelization",IDT_PARALLELIZATION_OPTIONS,7,84,355,93
|
||||
LTEXT "",IDT_LIMIT_ENC_THREAD_POOL_NOTE,18,126,334,33
|
||||
END
|
||||
|
||||
IDD_FAVORITE_VOLUMES DIALOGEX 0, 0, 380, 276
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "TrueCrypt - Favorite Volumes"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
CONTROL "",IDC_FAVORITE_VOLUMES_LIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,7,7,366,92
|
||||
PUSHBUTTON "Move &Up",IDC_FAVORITE_MOVE_UP,7,104,63,14
|
||||
PUSHBUTTON "Move &Down",IDC_FAVORITE_MOVE_DOWN,74,104,63,14
|
||||
PUSHBUTTON "&Remove",IDC_FAVORITE_REMOVE,310,104,63,14
|
||||
EDITTEXT IDC_FAVORITE_LABEL,16,142,204,13,ES_AUTOHSCROLL
|
||||
CONTROL "Mount selected volume as read-o&nly",IDC_FAVORITE_MOUNT_READONLY,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,162,349,10
|
||||
CONTROL "Mount selected volume as remo&vable medium",IDC_FAVORITE_MOUNT_REMOVABLE,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,176,349,10
|
||||
CONTROL "Mount selected volume upon log&on",IDC_FAVORITE_MOUNT_ON_LOGON,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,190,349,10
|
||||
CONTROL "Mount selected volume when its host device gets &connected",IDC_FAVORITE_MOUNT_ON_ARRIVAL,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,204,349,10
|
||||
CONTROL "Open &Explorer window for selected volume when successfully mounted",IDC_FAVORITE_OPEN_EXPLORER_WIN_ON_MOUNT,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,218,349,11
|
||||
CONTROL "Do not mount selected volume when 'Mount Favorite Volumes' &hot key is pressed",IDC_FAVORITE_DISABLE_HOTKEY,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,232,349,11
|
||||
LTEXT "Help on favorite volumes",IDC_FAVORITES_HELP_LINK,17,259,237,10,SS_NOTIFY
|
||||
DEFPUSHBUTTON "OK",IDOK,269,257,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,323,257,50,14
|
||||
GROUPBOX "",IDC_FAV_VOL_OPTIONS_GROUP_BOX,7,121,366,130
|
||||
LTEXT "Label of selected favorite volume:",IDT_FAVORITE_LABEL,18,132,202,8
|
||||
GROUPBOX "Global Settings",IDC_FAV_VOL_OPTIONS_GLOBAL_SETTINGS_BOX,7,202,366,49
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
BEGIN
|
||||
IDD_PREFERENCES_DLG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 329
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 280
|
||||
END
|
||||
|
||||
IDD_VOLUME_PROPERTIES, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 277
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 179
|
||||
END
|
||||
|
||||
IDD_PASSWORDCHANGE_DLG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 309
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 155
|
||||
END
|
||||
|
||||
IDD_MOUNT_DLG, DIALOG
|
||||
BEGIN
|
||||
RIGHTMARGIN, 369
|
||||
BOTTOMMARGIN, 269
|
||||
END
|
||||
|
||||
IDD_PASSWORD_DLG, DIALOG
|
||||
BEGIN
|
||||
BOTTOMMARGIN, 63
|
||||
END
|
||||
|
||||
IDD_TRAVELER_DLG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 293
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 262
|
||||
END
|
||||
|
||||
IDD_HOTKEYS_DLG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 374
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 232
|
||||
END
|
||||
|
||||
IDD_TOKEN_PREFERENCES, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 309
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 192
|
||||
END
|
||||
|
||||
IDD_SYSENC_SETTINGS, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 363
|
||||
TOPMARGIN, 7
|
||||
END
|
||||
|
||||
IDD_PERFORMANCE_SETTINGS, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 363
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 199
|
||||
END
|
||||
|
||||
IDD_FAVORITE_VOLUMES, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 373
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 269
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 7,1,1,0
|
||||
PRODUCTVERSION 7,1,1,0
|
||||
FILEFLAGSMASK 0x17L
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "TrueCrypt Foundation"
|
||||
VALUE "FileDescription", "TrueCrypt"
|
||||
VALUE "FileVersion", "7.1a"
|
||||
VALUE "LegalTrademarks", "TrueCrypt"
|
||||
VALUE "OriginalFilename", "TrueCrypt.exe"
|
||||
VALUE "ProductName", "TrueCrypt"
|
||||
VALUE "ProductVersion", "7.1a"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"#include ""..\\\\common\\\\resource.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""..\\\\common\\\\common.rc""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Bitmap
|
||||
//
|
||||
|
||||
IDB_DRIVEICON BITMAP "Drive_icon_96dpi.bmp"
|
||||
IDB_DRIVEICON_MASK BITMAP "Drive_icon_mask_96dpi.bmp"
|
||||
IDB_LOGO_96DPI BITMAP "Logo_96dpi.bmp"
|
||||
IDB_LOGO_288DPI BITMAP "Logo_288dpi.bmp"
|
||||
IDB_SYS_DRIVEICON BITMAP "System_drive_icon_96dpi.bmp"
|
||||
IDB_SYS_DRIVEICON_MASK BITMAP "System_drive_icon_mask_96dpi.bmp"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Menu
|
||||
//
|
||||
|
||||
IDR_MENU MENU
|
||||
BEGIN
|
||||
POPUP "&Volumes"
|
||||
BEGIN
|
||||
MENUITEM "Select File...", IDM_SELECT_FILE
|
||||
MENUITEM "Select Device...", IDM_SELECT_DEVICE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Create New Volume...", IDM_CREATE_VOLUME
|
||||
MENUITEM "Resume Interrupted Process", IDM_RESUME_INTERRUPTED_PROC
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Mount Volume", IDM_MOUNT_VOLUME
|
||||
MENUITEM "Mount Volume with Options", IDM_MOUNT_VOLUME_OPTIONS
|
||||
MENUITEM "Auto-Mount All Device-Hosted Volumes", IDM_MOUNTALL
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Dismount Volume", IDM_UNMOUNT_VOLUME
|
||||
MENUITEM "Dismount All Mounted Volumes", IDM_UNMOUNTALL
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Change Volume Password...", IDM_CHANGE_PASSWORD
|
||||
MENUITEM "Add/Remove Keyfiles to/from Volume...", IDM_ADD_REMOVE_VOL_KEYFILES
|
||||
MENUITEM "Remove All Keyfiles from Volume...", IDM_REMOVE_ALL_KEYFILES_FROM_VOL
|
||||
MENUITEM "Set Header Key Derivation Algorithm...", IDM_CHANGE_HEADER_KEY_DERIV_ALGO
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Volume Properties", IDM_VOLUME_PROPERTIES
|
||||
END
|
||||
POPUP "S&ystem"
|
||||
BEGIN
|
||||
MENUITEM "Encrypt System Partition/Drive...", IDM_ENCRYPT_SYSTEM_DEVICE
|
||||
MENUITEM "Permanently Decrypt System Partition/Drive", IDM_PERMANENTLY_DECRYPT_SYS
|
||||
MENUITEM "Resume Interrupted Process", IDM_SYSENC_RESUME
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Create Hidden Operating System...", IDM_CREATE_HIDDEN_OS
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Create Rescue Disk...", IDM_CREATE_RESCUE_DISK
|
||||
MENUITEM "Verify Rescue Disk", IDM_VERIFY_RESCUE_DISK
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Mount Without Pre-Boot &Authentication...", IDM_MOUNT_SYSENC_PART_WITHOUT_PBA
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Change Password...", IDM_CHANGE_SYS_PASSWORD
|
||||
MENUITEM "Set Header Key Derivation Algorithm...", IDM_CHANGE_SYS_HEADER_KEY_DERIV_ALGO
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Properties...", IDM_SYSTEM_ENCRYPTION_STATUS
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Settings...", IDM_SYS_ENC_SETTINGS
|
||||
END
|
||||
POPUP "Favor&ites"
|
||||
BEGIN
|
||||
MENUITEM "Add Mounted Volume to Favorites...", IDM_ADD_VOLUME_TO_FAVORITES
|
||||
MENUITEM "Add Mounted Volume to System Favorites...", IDM_ADD_VOLUME_TO_SYSTEM_FAVORITES
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Organize Favorite Volumes...", IDM_ORGANIZE_FAVORITES
|
||||
MENUITEM "Organize System Favorite Volumes...", IDM_ORGANIZE_SYSTEM_FAVORITES
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Mount Favorite Volumes", IDM_MOUNT_FAVORITE_VOLUMES
|
||||
END
|
||||
POPUP "T&ools"
|
||||
BEGIN
|
||||
MENUITEM "Benchmark...", IDM_BENCHMARK
|
||||
MENUITEM "Test Vectors...", IDM_TEST_VECTORS
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Traveler Disk Setup...", IDM_TRAVELER
|
||||
MENUITEM "Volume Creation Wizard", IDM_VOLUME_WIZARD
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Keyfile Generator", IDM_KEYFILE_GENERATOR
|
||||
MENUITEM "Manage Security Token Keyfiles...", IDM_MANAGE_TOKEN_KEYFILES
|
||||
MENUITEM "Close All Security Token Sessions", IDM_CLOSE_ALL_TOKEN_SESSIONS
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Backup Volume Header...", IDM_BACKUP_VOL_HEADER
|
||||
MENUITEM "Restore Volume Header...", IDM_RESTORE_VOL_HEADER
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Refresh Drive Letters", IDM_REFRESH_DRIVE_LETTERS
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Clear Volume History", IDM_CLEAR_HISTORY
|
||||
MENUITEM "Wipe Cached Passwords", IDM_WIPE_CACHE
|
||||
END
|
||||
POPUP "Settin&gs"
|
||||
BEGIN
|
||||
MENUITEM "Language...", IDM_LANGUAGE
|
||||
MENUITEM "Hot Keys...", IDM_HOTKEY_SETTINGS
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "System Encryption...", IDM_SYSENC_SETTINGS
|
||||
MENUITEM "System Favorite Volumes...", IDM_SYS_FAVORITES_SETTINGS
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Performance...", IDM_PERFORMANCE_SETTINGS
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Default Keyfiles...", IDM_DEFAULT_KEYFILES
|
||||
MENUITEM "Security Tokens...", IDM_TOKEN_PREFERENCES
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Preferences...", IDM_PREFERENCES
|
||||
END
|
||||
POPUP "Hel&p"
|
||||
BEGIN
|
||||
MENUITEM "User's Guide", IDM_HELP
|
||||
MENUITEM "Online Help", IDM_ONLINE_HELP
|
||||
MENUITEM "Beginner's Tutorial", IDM_ONLINE_TUTORIAL
|
||||
MENUITEM "Frequently Asked Questions", IDM_FAQ
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "TrueCrypt Website", IDM_WEBSITE
|
||||
MENUITEM "Downloads", IDM_TC_DOWNLOADS
|
||||
MENUITEM "News", IDM_NEWS
|
||||
MENUITEM "Version History", IDM_VERSION_HISTORY
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Analyze a System Crash...", IDM_ANALYZE_SYSTEM_CRASH
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Contact", IDM_CONTACT
|
||||
MENUITEM "Legal Notices", IDM_LICENSE
|
||||
MENUITEM "About", IDM_ABOUT
|
||||
END
|
||||
MENUITEM "&Homepage ", IDM_HOMEPAGE
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_UACSTRING "TrueCrypt"
|
||||
END
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
#include "..\\common\\common.rc"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
689
src/Mount/Mount.vcproj
Normal file
689
src/Mount/Mount.vcproj
Normal file
@@ -0,0 +1,689 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="Mount"
|
||||
ProjectGUID="{E4C40F94-E7F9-4981-86E4-186B46F993F3}"
|
||||
RootNamespace="Mount"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
AdditionalIncludeDirectories=""
|
||||
TypeLibraryName="$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb"
|
||||
OutputDirectory=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\Common;..\Crypto;..\;$(PKCS11_INC)"
|
||||
PreprocessorDefinitions="TCMOUNT;WIN32;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS"
|
||||
MinimalRebuild="true"
|
||||
ExceptionHandling="1"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
BufferSecurityCheck="true"
|
||||
EnableFunctionLevelLinking="false"
|
||||
UsePrecompiledHeader="0"
|
||||
BrowseInformation="0"
|
||||
BrowseInformationFile=""
|
||||
WarningLevel="4"
|
||||
DebugInformationFormat="4"
|
||||
DisableSpecificWarnings="4057;4100;4127;4201;4701;4706"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="comctl32.lib setupapi.lib version.lib ..\Crypto\Debug\crypto.lib"
|
||||
OutputFile="$(OutDir)/TrueCrypt.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateManifest="false"
|
||||
IgnoreAllDefaultLibraries="false"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/Mount.pdb"
|
||||
SubSystem="2"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
AdditionalManifestFiles="Mount.manifest"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="md "..\Debug\Setup Files" 2>NUL:
copy Debug\TrueCrypt.exe "..\Debug\Setup Files" >NUL:
"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
AdditionalIncludeDirectories=""
|
||||
TypeLibraryName="$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb"
|
||||
OutputDirectory=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/w34189"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories="..\Common;..\Crypto;..\;$(PKCS11_INC)"
|
||||
PreprocessorDefinitions="TCMOUNT;WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="true"
|
||||
UsePrecompiledHeader="0"
|
||||
AssemblerOutput="2"
|
||||
AssemblerListingLocation="$(IntDir)/"
|
||||
WarningLevel="4"
|
||||
DebugInformationFormat="0"
|
||||
DisableSpecificWarnings="4057;4100;4127;4201;4701;4706"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="comctl32.lib setupapi.lib version.lib ..\Crypto\Release\crypto.lib"
|
||||
OutputFile="$(OutDir)/TrueCrypt.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateManifest="false"
|
||||
IgnoreAllDefaultLibraries="false"
|
||||
GenerateDebugInformation="false"
|
||||
GenerateMapFile="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
AdditionalManifestFiles="Mount.manifest"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="copy Release\TrueCrypt.exe "..\Release\Setup Files""
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\Favorites.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Hotkeys.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\MainCom.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\MainCom.idl"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Mount.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<Filter
|
||||
Name="Common"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\Common\BaseCom.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\BootEncryption.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Cmdline.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Combo.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Crc.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Crypto.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Dictionary.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Dlgcode.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\EncryptionThreadPool.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Endian.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\GfMul.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Keyfiles.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Language.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Password.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Pkcs5.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Random.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Registry.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\SecurityToken.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Tests.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Volumes.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Wipe.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Xml.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Xts.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\Common\Apidrvr.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\BaseCom.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\BootEncryption.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Cmdline.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Combo.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Common.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Crc.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Crypto.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Dictionary.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Dlgcode.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\EncryptionThreadPool.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Exception.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Favorites.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\GfMul.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Hotkeys.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Keyfiles.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Language.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\MainCom.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Mount.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Password.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Pkcs5.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Random.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Registry.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Resource.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\resource.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\SecurityToken.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Tcdefs.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Tests.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Volumes.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Xml.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Xts.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\Drive_icon_96dpi.bmp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Drive_icon_mask_96dpi.bmp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Logo_288dpi.bmp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Logo_96dpi.bmp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Mount.manifest"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Mount.rc"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Mount.tlb"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\System_drive_icon_96dpi.bmp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\System_drive_icon_mask_96dpi.bmp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\TrueCrypt_mounted.ico"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\TrueCrypt_volume.ico"
|
||||
>
|
||||
</File>
|
||||
<Filter
|
||||
Name="Common"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\Boot\Windows\Release_AES\BootLoader.com.gz"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Boot\Windows\Release\BootLoader.com.gz"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Boot\Windows\Release_Twofish\BootLoader.com.gz"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Boot\Windows\Rescue_Serpent\BootLoader.com.gz"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Boot\Windows\Rescue_AES\BootLoader.com.gz"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Boot\Windows\Rescue\BootLoader.com.gz"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Boot\Windows\Rescue_Twofish\BootLoader.com.gz"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Boot\Windows\Release_Serpent\BootLoader.com.gz"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Boot\Windows\Rescue\BootSector.bin"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Boot\Windows\Release_Twofish\BootSector.bin"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Boot\Windows\Release_Serpent\BootSector.bin"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Boot\Windows\Rescue_Serpent\BootSector.bin"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Boot\Windows\Rescue_AES\BootSector.bin"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Boot\Windows\Release\BootSector.bin"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Boot\Windows\Rescue_Twofish\BootSector.bin"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Boot\Windows\Release_AES\BootSector.bin"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Common.rc"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Boot\Windows\Release\Decompressor.com"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Language.xml"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Resources\Texts\License.rtf"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Textual_logo_288dpi.bmp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Textual_logo_96dpi.bmp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\Textual_logo_background.bmp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Common\TrueCrypt.ico"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
234
src/Mount/Resource.h
Normal file
234
src/Mount/Resource.h
Normal file
@@ -0,0 +1,234 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by Mount.rc
|
||||
//
|
||||
#define IDR_MOUNT_TLB 1
|
||||
#define IDD_MOUNT_DLG 101
|
||||
#define IDD_PASSWORDCHANGE_DLG 102
|
||||
#define IDB_DRIVEICON 103
|
||||
#define IDD_PASSWORD_DLG 104
|
||||
#define IDB_DRIVEICON_MASK 105
|
||||
#define IDR_MENU 106
|
||||
#define IDD_PREFERENCES_DLG 107
|
||||
#define IDD_VOLUME_PROPERTIES 108
|
||||
#define IDR_MOUNT_RSRC_HEADER 109
|
||||
#define IDS_UACSTRING 110
|
||||
#define IDB_LOGO_288DPI 111
|
||||
#define IDB_LOGO_96DPI 112
|
||||
#define IDB_SYS_DRIVEICON 113
|
||||
#define IDB_SYS_DRIVEICON_MASK 114
|
||||
#define IDD_TOKEN_PREFERENCES 115
|
||||
#define IDD_SYSENC_SETTINGS 116
|
||||
#define IDD_FAVORITE_VOLUMES 117
|
||||
#define IDC_PREF_MOUNT_READONLY 1000
|
||||
#define IDC_PREF_MOUNT_REMOVABLE 1001
|
||||
#define IDC_VERIFY 1002
|
||||
#define IDC_PREF_BKG_TASK_ENABLE 1003
|
||||
#define IDC_OLD_PASSWORD 1004
|
||||
#define IDC_CACHE 1005
|
||||
#define IDC_NO_HISTORY 1006
|
||||
#define IDC_DRIVELIST 1007
|
||||
#define IDC_PREF_OPEN_EXPLORER 1008
|
||||
#define IDC_ENABLE_KEYFILES 1009
|
||||
#define IDC_VOLUME_PROPERTIES_LIST 1010
|
||||
#define IDC_PREF_USE_DIFF_TRAY_ICON_IF_VOL_MOUNTED 1011
|
||||
#define IDC_ENABLE_NEW_KEYFILES 1012
|
||||
#define IDC_PRESERVE_TIMESTAMPS 1013
|
||||
#define IDC_PREF_WIPE_CACHE_ON_EXIT 1014
|
||||
#define IDC_PKCS5_PRF_ID 1015
|
||||
#define IDC_PREF_CACHE_PASSWORDS 1016
|
||||
#define IDC_DIRECTORY 1017
|
||||
#define IDC_PREF_DISMOUNT_LOGOFF 1018
|
||||
#define IDC_BROWSE_DIRS 1019
|
||||
#define IDC_PREF_DISMOUNT_INACTIVE 1020
|
||||
#define IDC_AUTORUN_DISABLE 1021
|
||||
#define IDC_AUTORUN_START 1022
|
||||
#define IDC_BENCHMARK 1023
|
||||
#define IDC_AUTORUN_MOUNT 1024
|
||||
#define IDC_VOLUME_NAME 1025
|
||||
#define IDC_COPY_WIZARD 1026
|
||||
#define IDC_MOUNT_OPTIONS 1027
|
||||
#define IDT_TRAVELER_MOUNT 1028
|
||||
#define IDT_MOUNT_LETTER 1029
|
||||
#define IDT_MOUNT_SETTINGS 1030
|
||||
#define IDC_KEY_FILES 1031
|
||||
#define IDC_NEW_KEYFILES 1032
|
||||
#define IDC_KEYFILES 1033
|
||||
#define IDC_VOLUME 1034
|
||||
#define IDC_PASSWORD 1035
|
||||
#define IDC_BROWSE_FILES 1036
|
||||
#define IDC_SELECT_DEVICE 1037
|
||||
#define IDC_CREATE_VOLUME 1038
|
||||
#define IDC_VOLUME_TOOLS 1039
|
||||
#define IDC_WIPE_CACHE 1040
|
||||
#define IDC_MOUNTALL 1041
|
||||
#define IDD_TRAVELER_DLG 1042
|
||||
#define IDC_SELECT_FILE 1043
|
||||
#define IDD_HOTKEYS_DLG 1044
|
||||
#define IDC_VOLUME_PROPERTIES 1045
|
||||
#define IDT_FILE_SETTINGS 1046
|
||||
#define IDD_PERFORMANCE_SETTINGS 1047
|
||||
#define IDT_AUTORUN 1048
|
||||
#define IDT_TRAVEL_INSERTION 1049
|
||||
#define IDT_TRAVEL_ROOT 1050
|
||||
#define IDT_VOLUME 1051
|
||||
#define IDT_PASSWORD 1052
|
||||
#define IDT_CURRENT 1053
|
||||
#define IDT_NEW 1054
|
||||
#define IDT_NEW_PASSWORD 1055
|
||||
#define IDT_CONFIRM_PASSWORD 1056
|
||||
#define IDT_PKCS5_PRF 1057
|
||||
#define IDT_PW_CACHE_OPTIONS 1058
|
||||
#define IDT_DEFAULT_MOUNT_OPTIONS 1059
|
||||
#define IDT_WINDOWS_RELATED_SETTING 1060
|
||||
#define IDC_CREATE 1061
|
||||
#define IDC_EXIT 1062
|
||||
#define IDC_TRAVEL_OPEN_EXPLORER 1063
|
||||
#define IDC_TRAV_CACHE_PASSWORDS 1064
|
||||
#define IDC_UNMOUNTALL 1065
|
||||
#define IDT_TASKBAR_ICON 1066
|
||||
#define IDT_AUTO_DISMOUNT 1067
|
||||
#define IDC_PREF_FORCE_AUTO_DISMOUNT 1068
|
||||
#define IDC_PREF_DISMOUNT_INACTIVE_TIME 1069
|
||||
#define IDT_MINUTES 1070
|
||||
#define IDC_PREF_DISMOUNT_SCREENSAVER 1071
|
||||
#define IDC_PREF_DISMOUNT_POWERSAVING 1072
|
||||
#define IDT_AUTO_DISMOUNT_ON 1073
|
||||
#define IDC_PREF_WIPE_CACHE_ON_AUTODISMOUNT 1074
|
||||
#define IDC_CLOSE_BKG_TASK_WHEN_NOVOL 1075
|
||||
#define IDC_MORE_INFO_ON_HW_ACCELERATION 1076
|
||||
#define IDT_LOGON 1077
|
||||
#define IDC_MORE_INFO_ON_THREAD_BASED_PARALLELIZATION 1078
|
||||
#define IDC_PREF_LOGON_START 1079
|
||||
#define IDC_PREF_LOGON_MOUNT_DEVICES 1080
|
||||
#define IDC_SHOW_PASSWORD_CHPWD_NEW 1081
|
||||
#define IDC_HK_DISMOUNT_BALLOON_TOOLTIP 1082
|
||||
#define IDC_SHOW_PASSWORD_CHPWD_ORI 1083
|
||||
#define IDC_HK_DISMOUNT_PLAY_SOUND 1084
|
||||
#define IDC_HOTKEY_ASSIGN 1085
|
||||
#define IDC_HOTKEY_REMOVE 1086
|
||||
#define IDC_HOTKEY_KEY 1087
|
||||
#define IDT_HOTKEY_KEY 1088
|
||||
#define IDC_HOTKEY_LIST 1089
|
||||
#define IDC_RESET_HOTKEYS 1090
|
||||
#define IDT_DISMOUNT_ACTION 1091
|
||||
#define IDT_ASSIGN_HOTKEY 1092
|
||||
#define IDC_HK_MOD_SHIFT 1093
|
||||
#define IDC_HK_MOD_CTRL 1094
|
||||
#define IDC_HK_MOD_ALT 1095
|
||||
#define IDC_HK_MOD_WIN 1096
|
||||
#define IDC_SHOW_PASSWORD 1097
|
||||
#define IDC_LOGO 1098
|
||||
#define IDT_PKCS11_LIB_PATH 1099
|
||||
#define IDC_PKCS11_MODULE 1100
|
||||
#define IDC_SELECT_PKCS11_MODULE 1101
|
||||
#define IDC_AUTO_DETECT_PKCS11_MODULE 1102
|
||||
#define IDC_CLOSE_TOKEN_SESSION_AFTER_MOUNT 1103
|
||||
#define IDT_SECURITY_OPTIONS 1104
|
||||
#define IDC_DISABLE_BOOT_LOADER_OUTPUT 1105
|
||||
#define IDC_ALLOW_ESC_PBA_BYPASS 1106
|
||||
#define IDC_CUSTOM_BOOT_LOADER_MESSAGE 1107
|
||||
#define IDC_BOOT_LOADER_CACHE_PASSWORD 1108
|
||||
#define IDC_MORE_SETTINGS 1109
|
||||
#define IDT_CUSTOM_BOOT_LOADER_MESSAGE 1110
|
||||
#define IDC_CUSTOM_BOOT_LOADER_MESSAGE_HELP 1111
|
||||
#define IDT_BOOT_LOADER_SCREEN_OPTIONS 1112
|
||||
#define IDT_PKCS11_LIB_HELP 1113
|
||||
#define IDT_ACCELERATION_OPTIONS 1114
|
||||
#define IDC_ENABLE_HARDWARE_ENCRYPTION 1115
|
||||
#define IDC_FAVORITE_VOLUMES_LIST 1116
|
||||
#define IDC_FAVORITE_MOUNT_READONLY 1117
|
||||
#define IDC_FAVORITE_MOUNT_REMOVABLE 1118
|
||||
#define IDC_FAVORITE_MOUNT_ON_ARRIVAL 1119
|
||||
#define IDC_FAVORITE_LABEL 1120
|
||||
#define IDT_FAVORITE_LABEL 1121
|
||||
#define IDC_FAVORITE_MOUNT_ON_LOGON 1122
|
||||
#define IDC_FAVORITE_DISABLE_HOTKEY 1123
|
||||
#define IDC_FAVORITE_MOVE_UP 1124
|
||||
#define IDC_FAVORITE_MOVE_DOWN 1125
|
||||
#define IDC_FAVORITE_REMOVE 1126
|
||||
#define IDT_HW_AES_SUPPORTED_BY_CPU 1127
|
||||
#define IDC_FAVORITE_OPEN_EXPLORER_WIN_ON_MOUNT 1128
|
||||
#define IDC_HW_AES_SUPPORTED_BY_CPU 1129
|
||||
#define IDC_LIMIT_ENC_THREAD_POOL 1130
|
||||
#define IDC_ENCRYPTION_FREE_CPU_COUNT 1131
|
||||
#define IDT_PARALLELIZATION_OPTIONS 1132
|
||||
#define IDT_LIMIT_ENC_THREAD_POOL_NOTE 1133
|
||||
#define IDC_FAV_VOL_OPTIONS_GROUP_BOX 1134
|
||||
#define IDC_FAVORITES_HELP_LINK 1135
|
||||
#define IDC_FAV_VOL_OPTIONS_GLOBAL_SETTINGS_BOX 1136
|
||||
#define IDM_HELP 40001
|
||||
#define IDM_ABOUT 40002
|
||||
#define IDM_UNMOUNT_VOLUME 40003
|
||||
#define IDM_CLEAR_HISTORY 40004
|
||||
#define IDM_BENCHMARK 40005
|
||||
#define IDM_TRAVELER 40006
|
||||
#define IDM_MOUNT_VOLUME_OPTIONS 40007
|
||||
#define IDM_FAQ 40008
|
||||
#define IDM_REFRESH_DRIVE_LETTERS 40009
|
||||
#define IDM_DEFAULT_KEYFILES 40010
|
||||
#define IDM_WEBSITE 40011
|
||||
#define IDM_MOUNTALL 40012
|
||||
#define IDM_UNMOUNTALL 40013
|
||||
#define IDM_MOUNT_VOLUME 40014
|
||||
#define IDM_CHANGE_PASSWORD 40015
|
||||
#define IDM_VOLUME_WIZARD 40016
|
||||
#define IDM_CREATE_VOLUME 40017
|
||||
#define IDM_WIPE_CACHE 40018
|
||||
#define IDM_PREFERENCES 40019
|
||||
#define IDM_LICENSE 40020
|
||||
#define IDM_SELECT_FILE 40021
|
||||
#define IDM_SELECT_DEVICE 40022
|
||||
#define IDM_VOLUME_PROPERTIES 40023
|
||||
#define IDM_LANGUAGE 40024
|
||||
#define IDM_MOUNT_FAVORITE_VOLUMES 40025
|
||||
#define IDM_BACKUP_VOL_HEADER 40026
|
||||
#define IDM_RESTORE_VOL_HEADER 40027
|
||||
#define IDM_HOTKEY_SETTINGS 40028
|
||||
#define IDM_TC_DOWNLOADS 40029
|
||||
#define IDM_NEWS 40030
|
||||
#define IDM_CONTACT 40031
|
||||
#define IDM_VERSION_HISTORY 40032
|
||||
#define IDM_HOMEPAGE 40033
|
||||
#define IDM_TEST_VECTORS 40034
|
||||
#define IDM_ADD_REMOVE_VOL_KEYFILES 40035
|
||||
#define IDM_REMOVE_ALL_KEYFILES_FROM_VOL 40036
|
||||
#define IDM_CHANGE_HEADER_KEY_DERIV_ALGO 40037
|
||||
#define IDM_KEYFILE_GENERATOR 40038
|
||||
#define IDM_ONLINE_TUTORIAL 40039
|
||||
#define IDM_ONLINE_HELP 40040
|
||||
#define IDM_CHANGE_SYS_HEADER_KEY_DERIV_ALGO 40041
|
||||
#define IDM_CHANGE_SYS_PASSWORD 40042
|
||||
#define IDM_CREATE_RESCUE_DISK 40043
|
||||
#define IDM_PERMANENTLY_DECRYPT_SYS 40044
|
||||
#define IDM_VERIFY_RESCUE_DISK 40045
|
||||
#define IDM_SYSTEM_ENCRYPTION_STATUS 40046
|
||||
#define IDM_ENCRYPT_SYSTEM_DEVICE 40047
|
||||
#define IDM_SYSENC_RESUME 40048
|
||||
#define IDM_MOUNT_SYSENC_PART_WITHOUT_PBA 40049
|
||||
#define IDM_CREATE_HIDDEN_OS 40050
|
||||
#define IDM_TOKEN_PREFERENCES 40051
|
||||
#define IDM_CLOSE_ALL_TOKEN_SESSIONS 40052
|
||||
#define IDM_SYS_ENC_SETTINGS 40053
|
||||
#define IDM_SYSENC_SETTINGS 40054
|
||||
#define IDM_RESUME_INTERRUPTED_PROC 40055
|
||||
#define IDM_MANAGE_TOKEN_KEYFILES 40056
|
||||
#define IDM_SYS_FAVORITES_SETTINGS 40057
|
||||
#define IDM_ORGANIZE_FAVORITES 40058
|
||||
#define IDM_ORGANIZE_SYSTEM_FAVORITES 40059
|
||||
#define IDM_ADD_VOLUME_TO_FAVORITES 40060
|
||||
#define IDM_ADD_VOLUME_TO_SYSTEM_FAVORITES 40061
|
||||
#define IDM_PERFORMANCE_SETTINGS 40062
|
||||
#define IDM_ANALYZE_SYSTEM_CRASH 40063
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NO_MFC 1
|
||||
#define _APS_NEXT_RESOURCE_VALUE 118
|
||||
#define _APS_NEXT_COMMAND_VALUE 40064
|
||||
#define _APS_NEXT_CONTROL_VALUE 1137
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
BIN
src/Mount/System_drive_icon_96dpi.bmp
Normal file
BIN
src/Mount/System_drive_icon_96dpi.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
BIN
src/Mount/System_drive_icon_mask_96dpi.bmp
Normal file
BIN
src/Mount/System_drive_icon_mask_96dpi.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 110 B |
Reference in New Issue
Block a user