diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2016-01-26 23:22:59 +0100 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2016-01-27 01:13:46 +0100 |
commit | dcb8390bb250780a4b8bb5fd8f91bc8e53e711bc (patch) | |
tree | 16d584455558e9b2f52fe570bf45fd8795887944 /src/Format/FormatCom.cpp | |
parent | 9f5b5445d720ae3cd67401c68415e2be9348869a (diff) | |
download | VeraCrypt-dcb8390bb250780a4b8bb5fd8f91bc8e53e711bc.tar.gz VeraCrypt-dcb8390bb250780a4b8bb5fd8f91bc8e53e711bc.zip |
Windows/Linux: Implement exFAT support.
Diffstat (limited to 'src/Format/FormatCom.cpp')
-rw-r--r-- | src/Format/FormatCom.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/Format/FormatCom.cpp b/src/Format/FormatCom.cpp index d52b21df..2dd5fa79 100644 --- a/src/Format/FormatCom.cpp +++ b/src/Format/FormatCom.cpp @@ -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)
{
|