mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-12 03:18:26 -06:00
Windows/Linux: Implement exFAT support.
This commit is contained in:
@@ -132,6 +132,11 @@ public:
|
||||
return BaseCom::WriteLocalMachineRegistryDwordValue (keyPath, valueName, value);
|
||||
}
|
||||
|
||||
virtual BOOL STDMETHODCALLTYPE FormatFs (int driveNo, int clusterSize, int fsType)
|
||||
{
|
||||
return ::FormatFs (driveNo, clusterSize, fsType);
|
||||
}
|
||||
|
||||
protected:
|
||||
DWORD MessageThreadId;
|
||||
LONG RefCount;
|
||||
@@ -207,6 +212,23 @@ extern "C" int UacFormatNtfs (HWND hWnd, int driveNo, int clusterSize)
|
||||
return r;
|
||||
}
|
||||
|
||||
extern "C" int UacFormatFs (HWND hWnd, int driveNo, int clusterSize, int fsType)
|
||||
{
|
||||
CComPtr<ITrueCryptFormatCom> tc;
|
||||
int r;
|
||||
|
||||
CoInitialize (NULL);
|
||||
|
||||
if (ComGetInstance (hWnd, &tc))
|
||||
r = tc->FormatFs (driveNo, clusterSize, fsType);
|
||||
else
|
||||
r = 0;
|
||||
|
||||
CoUninitialize ();
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
extern "C" int UacAnalyzeHiddenVolumeHost (HWND hwndDlg, int *driveNo, __int64 hiddenVolHostSize, int *realClusterSize, __int64 *nbrFreeClusters)
|
||||
{
|
||||
|
||||
@@ -25,6 +25,7 @@ extern "C" {
|
||||
|
||||
BOOL ComServerFormat ();
|
||||
int UacFormatNtfs (HWND hWnd, int driveNo, int clusterSize);
|
||||
int UacFormatFs (HWND hWnd, int driveNo, int clusterSize, int fsType);
|
||||
int UacAnalyzeHiddenVolumeHost (HWND hwndDlg, int *driveNo, __int64 hiddenVolHostSize, int *realClusterSize, __int64 *nbrFreeClusters);
|
||||
int UacFormatVolume (char *cvolumePath , BOOL bDevice , unsigned __int64 size , unsigned __int64 hiddenVolHostSize , Password *password , int cipher , int pkcs5 , BOOL quickFormat, BOOL sparseFileSwitch, int fileSystem , int clusterSize, HWND hwndDlg , BOOL hiddenVol , int *realClusterSize);
|
||||
BOOL UacUpdateProgressBar (__int64 nSecNo, BOOL *bVolTransformThreadCancel);
|
||||
|
||||
@@ -16,7 +16,7 @@ import "..\Common\Password.h";
|
||||
[
|
||||
uuid(56327DDA-F1A7-4e13-B128-520D129BDEF6),
|
||||
helpstring("VeraCrypt Format UAC Support Library"),
|
||||
version(2.4) // Update ComSetup.cpp when changing version number
|
||||
version(2.5) // Update ComSetup.cpp when changing version number
|
||||
]
|
||||
library TrueCryptFormatCom
|
||||
{
|
||||
@@ -39,6 +39,7 @@ library TrueCryptFormatCom
|
||||
DWORD RegisterSystemFavoritesService (BOOL registerService);
|
||||
DWORD SetDriverServiceStartType (DWORD startType);
|
||||
DWORD WriteLocalMachineRegistryDwordValue (BSTR keyPath, BSTR valueName, DWORD value);
|
||||
BOOL FormatFs (int driveNo, int clusterSize, int fsType);
|
||||
};
|
||||
|
||||
[
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user