"Fossies" - the Fresh Open Source Software Archive

Member "src/ExpandVolume/ExpandVolume.h" (10 Oct 2018, 2785 Bytes) of package /windows/misc/VeraCrypt_1.23-Hotfix-2_Source.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "ExpandVolume.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  Legal Notice: Some portions of the source code contained in this file were
    3  derived from the source code of TrueCrypt 7.1a, which is
    4  Copyright (c) 2003-2012 TrueCrypt Developers Association and which is
    5  governed by the TrueCrypt License 3.0, also from the source code of
    6  Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux
    7  and which is governed by the 'License Agreement for Encryption for the Masses'
    8  and also from the source code of extcv, which is Copyright (c) 2009-2010 Kih-Oskh
    9  or Copyright (c) 2012-2013 Josef Schneider <josef@netpage.dk>
   10 
   11  Modifications and additions to the original source code (contained in this file)
   12  and all other portions of this file are Copyright (c) 2013-2017 IDRIX
   13  and are governed by the Apache License 2.0 the full text of which is
   14  contained in the file License.txt included in VeraCrypt binary and source
   15  code distribution packages. */
   16 
   17 #ifndef TC_HEADER_ExpandVolume
   18 #define TC_HEADER_ExpandVolume
   19 
   20 /*  NTFS must be extended at least by one cluster (max. cluster size is 64kB) */
   21 #define TC_MINVAL_FS_EXPAND (64*1024LL)
   22 
   23 enum EV_FileSystem
   24 {
   25     EV_FS_TYPE_RAW = 0,
   26     EV_FS_TYPE_FAT = 1,
   27     EV_FS_TYPE_NTFS = 2,
   28     EV_FS_TYPE_EXFAT = 3,
   29 };
   30 
   31 extern const wchar_t * szFileSystemStr[4];
   32 
   33 typedef struct
   34 {
   35     uint64 oldSize;
   36     uint64 newSize;
   37     uint64 hostSizeFree;
   38     const wchar_t *szVolumeName;
   39     enum EV_FileSystem FileSystem;
   40     BOOL bIsDevice;
   41     BOOL bIsLegacy;
   42     BOOL bInitFreeSpace;
   43     Password *pVolumePassword;
   44     int VolumePkcs5;
   45     int VolumePim;
   46     HWND hwndDlg;
   47 } EXPAND_VOL_THREAD_PARAMS;
   48 
   49 #ifdef __cplusplus
   50 extern "C" {
   51 #endif
   52 
   53 extern HWND hCurPage;       /* Handle to current wizard page */
   54 extern int nPbar;           /* Control ID of progress bar:- for format code */
   55 extern volatile BOOL bVolTransformThreadCancel; /* TRUE if the user cancels/pauses volume expansion */
   56 
   57 /* defined in ExpandVolume.c */
   58 uint64 GetVolumeDataAreaSize (uint64 volumeSize, BOOL legacyVolume);
   59 uint64 GetVolumeSizeByDataAreaSize (uint64 dataSize, BOOL legacyVolume);
   60 int QueryVolumeInfo (HWND hwndDlg, const wchar_t *lpszVolume, uint64 * pHostSizeFree, uint64 * pSizeLimitFS );
   61 int MountVolTemp (HWND hwndDlg, wchar_t *volumePath, int *driveNo, Password *password, int pkcs5, int pim);
   62 BOOL GetFileSystemType(const wchar_t *szFileName, enum EV_FileSystem *pFS);
   63 BOOL GetNtfsNumberOfSectors(wchar_t *rootPath, uint64 *pNumberOfSectors, DWORD *pBytesPerSector);
   64 void __cdecl volTransformThreadFunction (void *hwndDlgArg);
   65 
   66 /* defined in DlgExpandVolume.cpp */
   67 void AddProgressDlgStatus(HWND hwndDlg, const wchar_t* szText);
   68 void SetProgressDlgStatus(HWND hwndDlg, const wchar_t* szText);
   69 
   70 #ifdef __cplusplus
   71 }
   72 #endif
   73 
   74 /* defined in DlgExpandVolume.cpp */
   75 void ExpandVolumeWizard (HWND hwndDlg, wchar_t *lpszVolume);
   76 
   77 
   78 #endif /* TC_HEADER_ExpandVolume */