diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2019-10-27 01:39:37 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2019-10-27 02:04:51 +0200 |
commit | 2722b465302626c2231f2d76e927bce3a9ccda4f (patch) | |
tree | 18cd3028c3bd84b2bb50b3aad9a48333569c2659 /src/Common/BootEncryption.h | |
parent | 89e2547851e258271f32bbb750f88a2953859cd3 (diff) | |
download | VeraCrypt-2722b465302626c2231f2d76e927bce3a9ccda4f.tar.gz VeraCrypt-2722b465302626c2231f2d76e927bce3a9ccda4f.zip |
Windows: code refactoring and convert NTSTATUS error code to WIN32 equivalent before displaying error message.
Diffstat (limited to 'src/Common/BootEncryption.h')
-rw-r--r-- | src/Common/BootEncryption.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Common/BootEncryption.h b/src/Common/BootEncryption.h index 19ea372e..a94f1918 100644 --- a/src/Common/BootEncryption.h +++ b/src/Common/BootEncryption.h @@ -29,6 +29,10 @@ typedef NTSTATUS (WINAPI *NtQuerySystemInformationFn)( PULONG ReturnLength ); +typedef ULONG (WINAPI *RtlNtStatusToDosErrorFn)( + NTSTATUS Status +); + using namespace std; namespace VeraCrypt @@ -193,7 +197,7 @@ namespace VeraCrypt static BOOL IsPostExecFileField (const string& szFieldValue, wstring& filePath); }; - void GetVolumeESP(wstring& path); + void GetVolumeESP(wstring& path, wstring& bootVolumePath); std::string ReadESPFile (LPCWSTR szFilePath, bool bSkipUTF8BOM); void WriteESPFile (LPCWSTR szFilePath, LPBYTE pbData, DWORD dwDataLen, bool bAddUTF8BOM); @@ -221,7 +225,6 @@ namespace VeraCrypt BOOL UpdateConfig (const wchar_t* name, int pim, int hashAlgo, HWND hwndDlg); BOOL WriteConfig (const wchar_t* name, bool preserveUserConfig, int pim, int hashAlgo, const char* passPromptMsg, HWND hwndDlg); BOOL DelDir(const wchar_t* name); - void SelectBootVolumeESP(); PSTORAGE_DEVICE_NUMBER GetStorageDeviceNumber () { if (bDeviceInfoValid) return &sdn; else { SetLastError (ERROR_INVALID_DRIVE); throw SystemException(SRC_POS);}} protected: @@ -231,7 +234,6 @@ namespace VeraCrypt PARTITION_INFORMATION_EX partInfo; bool bDeviceInfoValid; WCHAR tempBuf[1024]; - bool bBootVolumePathSelected; std::wstring BootVolumePath; }; |