mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 19:08:26 -06:00
Windows: better workaround for cases where ERROR_INVALID_PARAMETER is returned during system encryption which is due to 4096-bytes alignment of disk.
This commit is contained in:
@@ -37,7 +37,7 @@ namespace VeraCrypt
|
||||
{
|
||||
public:
|
||||
File () : Elevated (false), FileOpen (false), ReadOnly (false), FilePointerPosition(0), Handle(INVALID_HANDLE_VALUE), IsDevice(false), LastError(0) { }
|
||||
File (wstring path,bool readOnly = false, bool create = false, bool useNormalAttributes = false);
|
||||
File (wstring path,bool readOnly = false, bool create = false);
|
||||
virtual ~File () { Close(); }
|
||||
|
||||
void CheckOpened (const char* srcPos) { if (!FileOpen) { SetLastError (LastError); throw SystemException (srcPos);} }
|
||||
@@ -58,6 +58,7 @@ namespace VeraCrypt
|
||||
bool IsDevice;
|
||||
wstring Path;
|
||||
DWORD LastError;
|
||||
BYTE ReadBuffer[4096];
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user