VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Format/FormatCom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Format/FormatCom.cpp')
-rw-r--r--src/Format/FormatCom.cpp22
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)
{