|
|
1.1.1.10 root 1: /*
1.1.1.12 root 2: Legal Notice: Some portions of the source code contained in this file were
3: derived from the source code of Encryption for the Masses 2.02a, which is
4: Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License
5: Agreement for Encryption for the Masses'. Modifications and additions to
1.1.1.21 root 6: the original source code (contained in this file) and all other portions
1.1.1.22 root 7: of this file are Copyright (c) 2003-2010 TrueCrypt Developers Association
8: and are governed by the TrueCrypt License 3.0 the full text of which is
1.1.1.21 root 9: contained in the file License.txt included in TrueCrypt binary and source
10: code distribution packages. */
1.1.1.6 root 11:
1.1.1.12 root 12: #ifndef TC_HEADER_DLGCODE
13: #define TC_HEADER_DLGCODE
14:
1.1.1.6 root 15: #include "Common.h"
16: #include "Apidrvr.h"
17: #include "Keyfiles.h"
1.1.1.12 root 18: #include "Wipe.h"
1.1.1.6 root 19:
1.1.1.10 root 20: #ifdef __cplusplus
21: extern "C" {
22: #endif
23:
1.1.1.6 root 24: /* IDs for dynamically generated GUI elements */
1.1.1.12 root 25: enum dynamic_gui_element_ids
26: {
27: IDPM_CHECK_FILESYS = 500001,
28: IDPM_REPAIR_FILESYS,
29: IDPM_OPEN_VOLUME,
1.1.1.16 root 30: IDPM_SELECT_FILE_AND_MOUNT,
31: IDPM_SELECT_DEVICE_AND_MOUNT,
1.1.1.22 root 32: IDPM_ADD_TO_FAVORITES,
33: IDPM_ADD_TO_SYSTEM_FAVORITES,
1.1.1.12 root 34: IDM_SHOW_HIDE,
35: IDM_HOMEPAGE_SYSTRAY
36: };
37:
38: enum
39: {
40: TC_TBXID_LEGAL_NOTICES,
41: TC_TBXID_SYS_ENCRYPTION_PRETEST,
1.1.1.16 root 42: TC_TBXID_SYS_ENC_RESCUE_DISK,
1.1.1.20 root 43: TC_TBXID_DECOY_OS_INSTRUCTIONS,
44: TC_TBXID_EXTRA_BOOT_PARTITION_REMOVAL_INSTRUCTIONS
1.1.1.12 root 45: };
1.1.1.5 root 46:
1.1.1.20 root 47: #define TC_APPLICATION_ID L"TrueCryptFoundation.TrueCrypt"
48:
1.1.1.16 root 49: #define TC_MUTEX_NAME_SYSENC "Global\\TrueCrypt System Encryption Wizard"
50: #define TC_MUTEX_NAME_NONSYS_INPLACE_ENC "Global\\TrueCrypt In-Place Encryption Wizard"
51: #define TC_MUTEX_NAME_APP_SETUP "Global\\TrueCrypt Setup"
52: #define TC_MUTEX_NAME_DRIVER_SETUP "Global\\TrueCrypt Driver Setup"
1.1.1.15 root 53:
1.1.1.4 root 54: #define IDC_ABOUT 0x7fff /* ID for AboutBox on system menu in wm_user range */
55:
1.1.1.15 root 56: #define EXCL_ACCESS_MAX_AUTO_RETRIES 500
57: #define EXCL_ACCESS_AUTO_RETRY_DELAY 10
58:
1.1.1.11 root 59: #define UNMOUNT_MAX_AUTO_RETRIES 10
1.1.1.5 root 60: #define UNMOUNT_AUTO_RETRY_DELAY 50
1.1 root 61:
1.1.1.15 root 62: // After the user receives the "Incorrect password" error this number of times in a row, we should automatically
63: // try using the embedded header backup (if any). This ensures that the "Incorrect password" message is reported faster
64: // initially (most such errors are really caused by supplying an incorrect password, not by header corruption).
65: #define TC_TRY_HEADER_BAK_AFTER_NBR_WRONG_PWD_TRIES 2
66:
1.1.1.10 root 67: #define MAX_MULTI_CHOICES 10 /* Maximum number of options for mutliple-choice dialog */
68:
1.1.1.16 root 69: #define TC_APPD_FILENAME_CONFIGURATION "Configuration.xml"
70: #define TC_APPD_FILENAME_SYSTEM_ENCRYPTION "System Encryption.xml"
71: #define TC_APPD_FILENAME_DEFAULT_KEYFILES "Default Keyfiles.xml"
72: #define TC_APPD_FILENAME_HISTORY "History.xml"
73: #define TC_APPD_FILENAME_FAVORITE_VOLUMES "Favorite Volumes.xml"
1.1.1.21 root 74: #define TC_APPD_FILENAME_SYSTEM_FAVORITE_VOLUMES TC_APP_NAME " System Favorite Volumes.xml"
1.1.1.16 root 75: #define TC_APPD_FILENAME_NONSYS_INPLACE_ENC "In-Place Encryption"
76: #define TC_APPD_FILENAME_NONSYS_INPLACE_ENC_WIPE "In-Place Encryption Wipe Algo"
77: #define TC_APPD_FILENAME_POST_INSTALL_TASK_TUTORIAL "Post-Install Task - Tutorial"
78: #define TC_APPD_FILENAME_POST_INSTALL_TASK_RELEASE_NOTES "Post-Install Task - Release Notes"
1.1.1.6 root 79:
1.1.1.11 root 80: #ifndef USER_DEFAULT_SCREEN_DPI
81: #define USER_DEFAULT_SCREEN_DPI 96
82: #endif
83:
84: #if (USER_DEFAULT_SCREEN_DPI != 96)
1.1.1.18 root 85: # error Revision of GUI and graphics necessary, since everything assumes default screen DPI as 96 (note that 96 is the default on Windows 2000, XP, and Vista).
1.1.1.11 root 86: #endif
87:
1.1.1.15 root 88: enum
89: {
90: TC_POST_INSTALL_CFG_REMOVE_ALL = 0,
91: TC_POST_INSTALL_CFG_TUTORIAL,
92: TC_POST_INSTALL_CFG_RELEASE_NOTES
93: };
94:
1.1.1.9 root 95: extern char *LastDialogId;
1.1.1.12 root 96: extern char *ConfigBuffer;
1.1 root 97: extern char szHelpFile[TC_MAX_PATH];
1.1.1.6 root 98: extern char szHelpFile2[TC_MAX_PATH];
1.1.1.16 root 99: extern char SecurityTokenLibraryPath[TC_MAX_PATH];
1.1.1.6 root 100: extern HFONT hFixedDigitFont;
1.1 root 101: extern HFONT hBoldFont;
102: extern HFONT hTitleFont;
103: extern HFONT hFixedFont;
104: extern HFONT hUserFont;
105: extern HFONT hUserUnderlineFont;
106: extern HFONT hUserBoldFont;
1.1.1.20 root 107: extern HFONT WindowTitleBarFont;
1.1.1.11 root 108: extern int ScreenDPI;
109: extern double DlgAspectRatio;
1.1.1.6 root 110: extern HWND MainDlg;
111: extern BOOL Silent;
1.1.1.9 root 112: extern BOOL bHistory;
1.1.1.6 root 113: extern BOOL bPreserveTimestamp;
1.1.1.12 root 114: extern BOOL bStartOnLogon;
115: extern BOOL bMountDevicesOnLogon;
116: extern BOOL bMountFavoritesOnLogon;
1.1.1.14 root 117: extern int HiddenSectorDetectionStatus;
1.1.1.6 root 118: extern wchar_t *lpszTitle;
1.1.1.18 root 119: extern OSVersionEnum nCurrentOS;
1.1 root 120: extern int CurrentOSMajor;
121: extern int CurrentOSMinor;
1.1.1.18 root 122: extern int CurrentOSServicePack;
1.1.1.9 root 123: extern BOOL RemoteSession;
1.1 root 124: extern HANDLE hDriver;
125: extern HINSTANCE hInst;
1.1.1.12 root 126: extern int SystemEncryptionStatus;
127: extern WipeAlgorithmId nWipeMode;
128: extern BOOL bSysPartitionSelected;
129: extern BOOL bSysDriveSelected;
130:
131: extern BOOL bHyperLinkBeingTracked;
1.1.1.16 root 132: extern BOOL bInPlaceEncNonSysPending;
1.1 root 133:
1.1.1.6 root 134: extern BOOL KeyFilesEnable;
135: extern KeyFile *FirstKeyFile;
136: extern KeyFilesDlgParam defaultKeyFilesParam;
1.1.1.10 root 137: extern BOOL UacElevated;
1.1.1.11 root 138: extern BOOL IgnoreWmDeviceChange;
1.1.1.20 root 139: extern BOOL DeviceChangeBroadcastDisabled;
140: extern BOOL LastMountedVolumeDirty;
141: extern BOOL MountVolumesAsSystemFavorite;
1.1.1.22 root 142: extern BOOL FavoriteMountOnArrivalInProgress;
1.1.1.6 root 143:
1.1 root 144:
1.1.1.12 root 145: enum tc_app_msg_ids
146: {
147: /* WARNING: Changing these values or their meanings may cause incompatibility with other versions
148: (for example, if a new version of the TrueCrypt installer needed to shut down this version of
149: TrueCrypt during upgrade, it could fail or do something unwanted because the signal value would
150: be incorrect). When adding a new constant, verify that the value is unique within this block and
151: that it is less than WM_APP+16383. */
152:
153: // Common (inter-app)
154: TC_APPMSG_CLOSE_BKG_TASK = WM_APP + 4, // Changing this value will prevent smooth upgrades from pre-5.x versions
155: TC_APPMSG_SYSENC_CONFIG_UPDATE = WM_APP + 101,
156: TC_APPMSG_TASKBAR_ICON = WM_APP + 102,
157: TC_APPMSG_LOAD_TEXT_BOX_CONTENT = WM_APP + 103,
158: // Mount
159: TC_APPMSG_MOUNT_ENABLE_DISABLE_CONTROLS = WM_APP + 201,
160: TC_APPMSG_MOUNT_SHOW_WINDOW = WM_APP + 202,
1.1.1.13 root 161: TC_APPMSG_PREBOOT_PASSWORD_MODE = WM_APP + 203,
1.1.1.12 root 162: // Format
1.1.1.16 root 163: TC_APPMSG_VOL_TRANSFORM_THREAD_ENDED = WM_APP + 301,
1.1.1.12 root 164: TC_APPMSG_FORMAT_FINISHED = WM_APP + 302,
165: TC_APPMSG_FORMAT_USER_QUIT = WM_APP + 303,
166: TC_APPMSG_PERFORM_POST_WMINIT_TASKS = WM_APP + 304,
167: TC_APPMSG_PERFORM_POST_SYSENC_WMINIT_TASKS = WM_APP + 305,
1.1.1.16 root 168: TC_APPMSG_NONSYS_INPLACE_ENC_FINISHED = WM_APP + 306,
1.1.1.12 root 169: // Setup
170: TC_APPMSG_INSTALL_SUCCESS = WM_APP + 401,
171: TC_APPMSG_UNINSTALL_SUCCESS = WM_APP + 402,
172: TC_APPMSG_EXTRACTION_SUCCESS = WM_APP + 403,
173: TC_APPMSG_INSTALL_FAILURE = WM_APP + 404,
174: TC_APPMSG_UNINSTALL_FAILURE = WM_APP + 405,
1.1.1.16 root 175: TC_APPMSG_EXTRACTION_FAILURE = WM_APP + 406
1.1.1.12 root 176: };
177:
1.1.1.15 root 178: enum system_encryption_status
1.1.1.12 root 179: {
180: /* WARNING: As these values are written to config files, if they or their meanings
181: are changed, incompatiblity with other versions may arise (upgrade, downgrade, etc.).
182: When adding a new constant, verify that the value is unique within this block. */
183: SYSENC_STATUS_NONE = 0,
1.1.1.15 root 184: SYSENC_STATUS_PRETEST = 200, // This may also mean that the OS is to be (or has been) copied to a hidden volume (to create a hidden OS).
1.1.1.12 root 185: SYSENC_STATUS_ENCRYPTING = 400,
186: SYSENC_STATUS_DECRYPTING = 600
187: };
188:
189: enum vol_creation_wizard_modes
190: {
191: WIZARD_MODE_FILE_CONTAINER = 0,
192: WIZARD_MODE_NONSYS_DEVICE,
193: WIZARD_MODE_SYS_DEVICE
194: };
195:
1.1.1.15 root 196:
197: typedef struct
198: {
199: BOOL VolumeIsOpen;
200:
201: CRYPTO_INFO *CryptoInfo;
202: BOOL IsDevice;
203: HANDLE HostFileHandle;
204: uint64 HostSize;
205:
206: BOOL TimestampsValid;
207: FILETIME CreationTime;
208: FILETIME LastWriteTime;
209: FILETIME LastAccessTime;
210:
211: } OpenVolumeContext;
212:
213:
1.1.1.12 root 214: #define DEFAULT_VOL_CREATION_WIZARD_MODE WIZARD_MODE_FILE_CONTAINER
215:
1.1 root 216: #define ICON_HAND MB_ICONHAND
217: #define YES_NO MB_YESNO
218:
1.1.1.20 root 219: #define ISO_BURNER_TOOL "isoburn.exe"
1.1.1.12 root 220: #define PRINT_TOOL "notepad"
1.1.1.6 root 221:
1.1 root 222: void cleanup ( void );
1.1.1.16 root 223: void LowerCaseCopy ( char *lpszDest , const char *lpszSource );
224: void UpperCaseCopy ( char *lpszDest , const char *lpszSource );
225: void CreateFullVolumePath ( char *lpszDiskFile , const char *lpszFileName , BOOL *bDevice );
226: int FakeDosNameForDevice ( const char *lpszDiskFile , char *lpszDosDevice , char *lpszCFDevice , BOOL bNameOnly );
1.1 root 227: int RemoveFakeDosName ( char *lpszDiskFile , char *lpszDosDevice );
1.1.1.6 root 228: void AbortProcess ( char *stringId );
1.1.1.4 root 229: void AbortProcessSilent ( void );
1.1 root 230: void *err_malloc ( size_t size );
231: char *err_strdup ( char *lpszText );
1.1.1.4 root 232: DWORD handleWin32Error ( HWND hwndDlg );
1.1.1.18 root 233: BOOL IsDiskReadError (DWORD error);
234: BOOL IsDiskWriteError (DWORD error);
235: BOOL IsDiskError (DWORD error);
1.1.1.13 root 236: BOOL translateWin32Error ( wchar_t *lpszMsgBuf , int nWSizeOfBuf );
1.1.1.11 root 237: BOOL CALLBACK AboutDlgProc ( HWND hwndDlg , UINT msg , WPARAM wParam , LPARAM lParam );
1.1.1.23! root 238: static BOOL CALLBACK StaticModelessWaitDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
! 239: void DisplayStaticModelessWaitDlg (HWND parent);
! 240: void CloseStaticModelessWaitDlg (void);
1.1 root 241: BOOL IsButtonChecked ( HWND hButton );
242: void CheckButton ( HWND hButton );
1.1.1.12 root 243: void LeftPadString (char *szTmp, int len, int targetLen, char filler);
1.1 root 244: void ToSBCS ( LPWSTR lpszText );
245: void ToUNICODE ( char *lpszText );
246: void InitDialog ( HWND hwndDlg );
1.1.1.23! root 247: void ProcessPaintMessages (HWND hwnd, int maxMessagesToProcess);
1.1 root 248: HDC CreateMemBitmap ( HINSTANCE hInstance , HWND hwnd , char *resource );
1.1.1.11 root 249: HBITMAP RenderBitmap ( char *resource , HWND hwndDest , int x , int y , int nWidth , int nHeight , BOOL bDirectRender , BOOL bKeepAspectRatio);
1.1.1.6 root 250: LRESULT CALLBACK RedTick ( HWND hwnd , UINT uMsg , WPARAM wParam , LPARAM lParam );
251: BOOL RegisterRedTick ( HINSTANCE hInstance );
252: BOOL UnregisterRedTick ( HINSTANCE hInstance );
1.1 root 253: LRESULT CALLBACK SplashDlgProc ( HWND hwnd , UINT uMsg , WPARAM wParam , LPARAM lParam );
254: void WaitCursor ( void );
255: void NormalCursor ( void );
256: void ArrowWaitCursor ( void );
1.1.1.10 root 257: void HandCursor ();
1.1.1.16 root 258: void AddComboPair (HWND hComboBox, const char *lpszItem, int value);
259: void AddComboPairW (HWND hComboBox, const wchar_t *lpszItem, int value);
1.1.1.6 root 260: void SelectAlgo ( HWND hComboBox , int *nCipher );
1.1.1.16 root 261: void PopulateWipeModeCombo (HWND hComboBox, BOOL bNA, BOOL bInPlaceEncryption);
262: wchar_t *GetWipeModeName (WipeAlgorithmId modeId);
263: wchar_t *GetPathType (const char *path, BOOL bUpperCase, BOOL *bIsPartition);
1.1 root 264: LRESULT CALLBACK CustomDlgProc ( HWND hwnd , UINT uMsg , WPARAM wParam , LPARAM lParam );
1.1.1.15 root 265: BOOL TCCreateMutex (volatile HANDLE *hMutex, char *name);
266: void TCCloseMutex (volatile HANDLE *hMutex);
267: BOOL MutexExistsOnSystem (char *name);
1.1.1.12 root 268: BOOL CreateSysEncMutex (void);
1.1.1.15 root 269: BOOL InstanceHasSysEncMutex (void);
1.1.1.12 root 270: void CloseSysEncMutex (void);
1.1.1.16 root 271: BOOL CreateNonSysInplaceEncMutex (void);
272: BOOL InstanceHasNonSysInplaceEncMutex (void);
273: void CloseNonSysInplaceEncMutex (void);
274: BOOL NonSysInplaceEncInProgressElsewhere (void);
1.1.1.13 root 275: BOOL CreateDriverSetupMutex (void);
276: void CloseDriverSetupMutex (void);
1.1.1.15 root 277: BOOL CreateAppSetupMutex (void);
278: BOOL InstanceHasAppSetupMutex (void);
279: void CloseAppSetupMutex (void);
280: BOOL IsTrueCryptInstallerRunning (void);
1.1.1.22 root 281: uint32 ReadDriverConfigurationFlags ();
282: uint32 ReadEncryptionThreadPoolFreeCpuCountLimit ();
1.1.1.12 root 283: BOOL LoadSysEncSettings (HWND hwndDlg);
1.1.1.16 root 284: int LoadNonSysInPlaceEncSettings (WipeAlgorithmId *wipeAlgorithm);
1.1.1.18 root 285: void RemoveNonSysInPlaceEncNotifications (void);
1.1.1.15 root 286: void SavePostInstallTasksSettings (int command);
287: void DoPostInstallTasks (void);
1.1.1.22 root 288: void InitOSVersionInfo ();
1.1.1.10 root 289: void InitApp ( HINSTANCE hInstance, char *lpszCommandLine );
1.1.1.6 root 290: void InitHelpFileName (void);
1.1.1.18 root 291: BOOL OpenDevice (const char *lpszPath, OPEN_TEST_STRUCT *driver, BOOL detectFilesystem);
1.1.1.20 root 292: void NotifyDriverOfPortableMode (void);
1.1 root 293: int GetAvailableFixedDisks ( HWND hComboBox , char *lpszRootPath );
294: int GetAvailableRemovables ( HWND hComboBox , char *lpszRootPath );
1.1.1.12 root 295: int IsSystemDevicePath (char *path, HWND hwndDlg, BOOL bReliableRequired);
1.1.1.11 root 296: BOOL CALLBACK RawDevicesDlgProc ( HWND hwndDlg , UINT msg , WPARAM wParam , LPARAM lParam );
1.1.1.12 root 297: BOOL TextInfoDialogBox (int nID);
298: BOOL CALLBACK TextInfoDialogBoxDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
1.1.1.6 root 299: char * GetLegalNotices ();
1.1.1.11 root 300: BOOL CALLBACK BenchmarkDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
1.1.1.18 root 301: void UserEnrichRandomPool (HWND hwndDlg);
1.1.1.11 root 302: BOOL CALLBACK KeyfileGeneratorDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
1.1.1.10 root 303: BOOL CALLBACK MultiChoiceDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
1.1 root 304: int DriverAttach ( void );
1.1.1.6 root 305: BOOL CALLBACK CipherTestDialogProc ( HWND hwndDlg , UINT uMsg , WPARAM wParam , LPARAM lParam );
306: void ResetCipherTest ( HWND hwndDlg , int idTestCipher );
1.1.1.20 root 307: void ResetCurrentDirectory ();
1.1.1.16 root 308: BOOL BrowseFiles (HWND hwndDlg, char *stringId, char *lpszFileName, BOOL keepHistory, BOOL saveMode, wchar_t *browseFilter);
1.1.1.6 root 309: BOOL BrowseDirectories (HWND hWnd, char *lpszTitle, char *dirName);
1.1 root 310: void handleError ( HWND hwndDlg , int code );
1.1.1.22 root 311: BOOL CheckFileStreamWriteErrors (FILE *file, const char *fileName);
1.1.1.6 root 312: void LocalizeDialog ( HWND hwnd, char *stringId );
1.1.1.4 root 313: void OpenVolumeExplorerWindow (int driveNo);
314: static BOOL CALLBACK CloseVolumeExplorerWindowsEnum( HWND hwnd, LPARAM driveNo);
315: BOOL CloseVolumeExplorerWindows (HWND hwnd, int driveNo);
316: BOOL CheckCapsLock (HWND hwnd, BOOL quiet);
1.1.1.10 root 317: BOOL CheckFileExtension (char *fileName);
1.1.1.15 root 318: void IncreaseWrongPwdRetryCount (int count);
319: void ResetWrongPwdRetryCount (void);
320: BOOL WrongPwdRetryCountOverLimit (void);
1.1.1.4 root 321: int GetFirstAvailableDrive ();
322: int GetLastAvailableDrive ();
323: BOOL IsDriveAvailable (int driveNo);
1.1.1.10 root 324: BOOL IsDeviceMounted (char *deviceName);
1.1.1.4 root 325: int DriverUnmountVolume (HWND hwndDlg, int nDosDriveNo, BOOL forced);
1.1.1.5 root 326: void BroadcastDeviceChange (WPARAM message, int nDosDriveNo, DWORD driveMap);
1.1.1.6 root 327: int MountVolume (HWND hwndDlg, int driveNo, char *volumePath, Password *password, BOOL cachePassword, BOOL sharedAccess, MountOptions *mountOptions, BOOL quiet, BOOL bReportWrongPassword);
1.1.1.4 root 328: BOOL UnmountVolume (HWND hwndDlg , int nDosDriveNo, BOOL forceUnmount);
329: BOOL IsPasswordCacheEmpty (void);
1.1.1.16 root 330: BOOL IsMountedVolume (const char *volname);
1.1.1.11 root 331: int GetMountedVolumeDriveNo (char *volname);
1.1.1.4 root 332: BOOL IsAdmin (void);
1.1.1.20 root 333: BOOL IsBuiltInAdmin ();
1.1.1.10 root 334: BOOL IsUacSupported ();
1.1.1.20 root 335: BOOL ResolveSymbolicLink (const wchar_t *symLinkName, PWSTR targetName);
1.1.1.4 root 336: int GetDiskDeviceDriveLetter (PWSTR deviceName);
1.1.1.16 root 337: int FileSystemAppearsEmpty (const char *devicePath);
338: __int64 GetStatsFreeSpaceOnPartition (const char *devicePath, float *percent, __int64 *occupiedBytes, BOOL silent);
339: __int64 GetDeviceSize (const char *devicePath);
340: HANDLE DismountDrive (char *devName, char *devicePath);
341: int64 FindString (const char *buf, const char *str, int64 bufLen, size_t strLen, int64 startOffset);
1.1.1.12 root 342: BOOL FileExists (const char *filePathPtr);
1.1.1.16 root 343: __int64 FindStringInFile (const char *filePath, const char *str, int strLen);
1.1.1.5 root 344: BOOL TCCopyFile (char *sourceFileName, char *destinationFile);
1.1.1.22 root 345: BOOL SaveBufferToFile (const char *inputBuffer, const char *destinationFile, DWORD inputLength, BOOL bAppend);
1.1.1.15 root 346: BOOL TCFlushFile (FILE *f);
1.1.1.12 root 347: BOOL PrintHardCopyTextUTF16 (wchar_t *text, char *title, int byteLen);
1.1.1.6 root 348: void GetSpeedString (unsigned __int64 speed, wchar_t *str);
1.1.1.5 root 349: BOOL IsNonInstallMode ();
1.1.1.6 root 350: BOOL DriverUnload ();
351: LRESULT SetCheckBox (HWND hwndDlg, int dlgItem, BOOL state);
352: BOOL GetCheckBox (HWND hwndDlg, int dlgItem);
1.1.1.22 root 353: void SetListScrollHPos (HWND hList, int topMostVisibleItem);
1.1.1.12 root 354: void ManageStartupSeq (void);
1.1.1.18 root 355: void ManageStartupSeqWiz (BOOL bRemove, const char *arg);
1.1.1.6 root 356: void CleanLastVisitedMRU (void);
1.1.1.10 root 357: void ClearHistory (HWND hwndDlgItem);
1.1.1.6 root 358: LRESULT ListItemAdd (HWND list, int index, char *string);
359: LRESULT ListItemAddW (HWND list, int index, wchar_t *string);
360: LRESULT ListSubItemSet (HWND list, int index, int subIndex, char *string);
361: LRESULT ListSubItemSetW (HWND list, int index, int subIndex, wchar_t *string);
362: BOOL GetMountList (MOUNT_LIST_STRUCT *list);
363: int GetDriverRefCount ();
364: void GetSizeString (unsigned __int64 size, wchar_t *str);
1.1.1.16 root 365: __int64 GetFileSize64 (const char *path);
1.1.1.12 root 366: BOOL LoadInt16 (char *filePath, int *result, __int64 fileOffset);
367: BOOL LoadInt32 (char *filePath, unsigned __int32 *result, __int64 fileOffset);
1.1.1.16 root 368: char *LoadFile (const char *fileName, DWORD *size);
1.1.1.20 root 369: char *LoadFileBlock (char *fileName, __int64 fileOffset, size_t count);
1.1.1.10 root 370: char *GetModPath (char *path, int maxSize);
1.1.1.6 root 371: char *GetConfigPath (char *fileName);
1.1.1.20 root 372: char *GetProgramConfigPath (char *fileName);
1.1.1.12 root 373: char GetSystemDriveLetter (void);
1.1.1.6 root 374: void OpenPageHelp (HWND hwndDlg, int nPage);
375: int Info (char *stringId);
1.1.1.17 root 376: int InfoTopMost (char *stringId);
1.1.1.15 root 377: int InfoDirect (const wchar_t *msg);
1.1.1.6 root 378: int Warning (char *stringId);
1.1.1.15 root 379: int WarningTopMost (char *stringId);
380: int WarningDirect (const wchar_t *warnMsg);
1.1.1.6 root 381: int Error (char *stringId);
1.1.1.15 root 382: int ErrorDirect (const wchar_t *errMsg);
383: int ErrorTopMost (char *stringId);
1.1.1.6 root 384: int AskYesNo (char *stringId);
1.1.1.20 root 385: int AskYesNoString (const wchar_t *str);
1.1.1.6 root 386: int AskNoYes (char *stringId);
1.1.1.12 root 387: int AskOkCancel (char *stringId);
1.1.1.6 root 388: int AskWarnYesNo (char *stringId);
389: int AskWarnNoYes (char *stringId);
1.1.1.20 root 390: int AskWarnNoYesString (const wchar_t *string);
391: int AskWarnYesNoString (const wchar_t *string);
1.1.1.16 root 392: int AskWarnOkCancel (char *stringId);
1.1.1.6 root 393: int AskWarnCancelOk (char *stringId);
1.1.1.12 root 394: int AskErrYesNo (char *stringId);
395: int AskErrNoYes (char *stringId);
1.1.1.16 root 396: int AskMultiChoice (void *strings[], BOOL bBold);
1.1.1.6 root 397: BOOL ConfigWriteBegin ();
398: BOOL ConfigWriteEnd ();
399: BOOL ConfigWriteString (char *configKey, char *configValue);
400: BOOL ConfigWriteInt (char *configKey, int configValue);
401: int ConfigReadInt (char *configKey, int defaultValue);
402: char *ConfigReadString (char *configKey, char *defaultValue, char *str, int maxLen);
403: void RestoreDefaultKeyFilesParam (void);
404: BOOL LoadDefaultKeyFilesParam (void);
405: void Debug (char *format, ...);
406: void DebugMsgBox (char *format, ...);
1.1.1.18 root 407: BOOL IsOSAtLeast (OSVersionEnum reqMinOS);
408: BOOL IsOSVersionAtLeast (OSVersionEnum reqMinOS, int reqMinServicePack);
1.1.1.6 root 409: BOOL Is64BitOs ();
1.1.1.20 root 410: BOOL IsServerOS ();
1.1.1.15 root 411: BOOL IsHiddenOSRunning (void);
1.1.1.22 root 412: BOOL EnableWow64FsRedirection (BOOL enable);
1.1.1.15 root 413: BOOL RestartComputer (void);
1.1.1.10 root 414: void Applink (char *dest, BOOL bSendOS, char *extraOutput);
1.1.1.6 root 415: char *RelativePath2Absolute (char *szFileName);
1.1.1.19 root 416: void HandleDriveNotReadyError ();
1.1.1.6 root 417: BOOL CALLBACK CloseTCWindowsEnum( HWND hwnd, LPARAM lParam);
1.1.1.7 root 418: BOOL CALLBACK FindTCWindowEnum (HWND hwnd, LPARAM lParam);
1.1.1.6 root 419: BYTE *MapResource (char *resourceType, int resourceId, PDWORD size);
1.1.1.12 root 420: void InconsistencyResolved (char *msg);
1.1.1.16 root 421: void ReportUnexpectedState (char *techInfo);
1.1.1.8 root 422: BOOL SelectMultipleFiles (HWND hwndDlg, char *stringId, char *lpszFileName, BOOL keepHistory);
423: BOOL SelectMultipleFilesNext (char *lpszFileName);
1.1.1.9 root 424: void OpenOnlineHelp ();
1.1.1.16 root 425: BOOL GetPartitionInfo (const char *deviceName, PPARTITION_INFORMATION rpartInfo);
426: BOOL GetDeviceInfo (const char *deviceName, DISK_PARTITION_INFO_STRUCT *info);
427: BOOL GetDriveGeometry (const char *deviceName, PDISK_GEOMETRY diskGeometry);
1.1.1.22 root 428: BOOL IsVolumeDeviceHosted (const char *lpszDiskFile);
1.1.1.11 root 429: int CompensateXDPI (int val);
430: int CompensateYDPI (int val);
431: int CompensateDPIFont (int val);
1.1.1.20 root 432: int GetTextGfxWidth (HWND hwndDlgItem, const wchar_t *text, HFONT hFont);
433: int GetTextGfxHeight (HWND hwndDlgItem, const wchar_t *text, HFONT hFont);
1.1.1.10 root 434: BOOL ToHyperlink (HWND hwndDlg, UINT ctrlId);
1.1.1.12 root 435: void ToBootPwdField (HWND hwndDlg, UINT ctrlId);
1.1.1.11 root 436: void AccommodateTextField (HWND hwndDlg, UINT ctrlId, BOOL bFirstUpdate);
1.1.1.10 root 437: BOOL GetDriveLabel (int driveNo, wchar_t *label, int labelSize);
1.1.1.13 root 438: BOOL DoDriverInstall (HWND hwndDlg);
1.1.1.16 root 439: int OpenVolume (OpenVolumeContext *context, const char *volumePath, Password *password, BOOL write, BOOL preserveTimestamps, BOOL useBackupHeader);
1.1.1.15 root 440: void CloseVolume (OpenVolumeContext *context);
441: int ReEncryptVolumeHeader (char *buffer, BOOL bBoot, CRYPTO_INFO *cryptoInfo, Password *password, BOOL wipeMode);
1.1.1.16 root 442: BOOL IsPagingFileActive (BOOL checkNonWindowsPartitionsOnly);
1.1.1.18 root 443: BOOL IsPagingFileWildcardActive ();
1.1.1.15 root 444: BOOL DisablePagingFile ();
1.1.1.16 root 445: BOOL CALLBACK SecurityTokenPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
446: BOOL CALLBACK SecurityTokenKeyfileDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
447: BOOL InitSecurityTokenLibrary ();
1.1.1.17 root 448: BOOL FileHasReadOnlyAttribute (const char *path);
1.1.1.16 root 449: BOOL IsFileOnReadOnlyFilesystem (const char *path);
450: void CheckFilesystem (int driveNo, BOOL fixErrors);
1.1.1.18 root 451: BOOL BufferContainsString (const byte *buffer, size_t bufferSize, const char *str);
452: int AskNonSysInPlaceEncryptionResume ();
453: BOOL RemoveDeviceWriteProtection (HWND hwndDlg, char *devicePath);
1.1.1.19 root 454: void EnableElevatedCursorChange (HWND parent);
1.1.1.20 root 455: BOOL DisableFileCompression (HANDLE file);
456: BOOL VolumePathExists (char *volumePath);
457: BOOL IsWindowsIsoBurnerAvailable ();
458: BOOL LaunchWindowsIsoBurner (HWND hwnd, const char *isoPath);
1.1.1.22 root 459: BOOL IsApplicationInstalled (const char *appName);
1.1.1.10 root 460:
461: #ifdef __cplusplus
462: }
1.1.1.12 root 463:
1.1.1.16 root 464: #include <vector>
465: #include <string>
466:
467: struct HostDevice
468: {
469: HostDevice ()
470: :
1.1.1.21 root 471: Bootable (false),
1.1.1.16 root 472: ContainsSystem (false),
473: DynamicVolume (false),
474: Floppy (false),
475: IsPartition (false),
476: IsVirtualPartition (false),
1.1.1.18 root 477: HasUnencryptedFilesystem (false),
1.1.1.16 root 478: Removable (false),
479: Size (0)
480: {
481: }
482:
483: ~HostDevice () { }
484:
1.1.1.21 root 485: bool Bootable;
1.1.1.16 root 486: bool ContainsSystem;
487: bool DynamicVolume;
488: bool Floppy;
489: bool IsPartition;
490: bool IsVirtualPartition;
1.1.1.18 root 491: bool HasUnencryptedFilesystem;
1.1.1.16 root 492: std::string MountPoint;
493: std::wstring Name;
494: std::string Path;
495: bool Removable;
496: uint64 Size;
497: uint32 SystemNumber;
1.1.1.12 root 498:
1.1.1.16 root 499: std::vector <HostDevice> Partitions;
500: };
501:
1.1.1.20 root 502: BOOL BrowseFilesInDir (HWND hwndDlg, char *stringId, char *initialDir, char *lpszFileName, BOOL keepHistory, BOOL saveMode, wchar_t *browseFilter, const wchar_t *initialFileName = NULL, const wchar_t *defaultExtension = NULL);
1.1.1.16 root 503: std::wstring SingleStringToWide (const std::string &singleString);
504: std::wstring Utf8StringToWide (const std::string &utf8String);
505: std::string WideToSingleString (const std::wstring &wideString);
506: std::string WideToUtf8String (const std::wstring &wideString);
1.1.1.22 root 507: std::string StringToUpperCase (const std::string &str);
1.1.1.19 root 508: std::vector <HostDevice> GetAvailableHostDevices (bool noDeviceProperties = false, bool singleList = false, bool noFloppy = true, bool detectUnencryptedFilesystems = false);
1.1.1.16 root 509: std::string ToUpperCase (const std::string &str);
1.1.1.18 root 510: std::wstring GetWrongPasswordErrorMessage (HWND hwndDlg);
511: std::string GetWindowsEdition ();
1.1.1.20 root 512: std::string FitPathInGfxWidth (HWND hwnd, HFONT hFont, LONG width, const std::string &path);
1.1.1.21 root 513: std::string GetServiceConfigPath (const char *fileName);
1.1.1.22 root 514: std::string VolumeGuidPathToDevicePath (std::string volumeGuidPath);
515: std::string FindLatestFileOrDirectory (const std::string &directory, const char *namePattern, bool findDirectory, bool findFile);
516: std::string GetUserFriendlyVersionString (int version);
1.1.1.16 root 517:
518: #endif // __cplusplus
519:
520: #endif // TC_HEADER_DLGCODE
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.