VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Format
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2016-01-26 23:22:59 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2016-01-27 01:13:46 +0100
commitdcb8390bb250780a4b8bb5fd8f91bc8e53e711bc (patch)
tree16d584455558e9b2f52fe570bf45fd8795887944 /src/Format
parent9f5b5445d720ae3cd67401c68415e2be9348869a (diff)
downloadVeraCrypt-dcb8390bb250780a4b8bb5fd8f91bc8e53e711bc.tar.gz
VeraCrypt-dcb8390bb250780a4b8bb5fd8f91bc8e53e711bc.zip
Windows/Linux: Implement exFAT support.
Diffstat (limited to 'src/Format')
-rw-r--r--src/Format/FormatCom.cpp22
-rw-r--r--src/Format/FormatCom.h1
-rw-r--r--src/Format/FormatCom.idl3
-rw-r--r--src/Format/Tcformat.cbin634106 -> 636272 bytes
4 files changed, 25 insertions, 1 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)
{
diff --git a/src/Format/FormatCom.h b/src/Format/FormatCom.h
index 4ae0c3af..e79cd9cc 100644
--- a/src/Format/FormatCom.h
+++ b/src/Format/FormatCom.h
@@ -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);
diff --git a/src/Format/FormatCom.idl b/src/Format/FormatCom.idl
index 39805cf9..5579d28d 100644
--- a/src/Format/FormatCom.idl
+++ b/src/Format/FormatCom.idl
@@ -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);
};
[
diff --git a/src/Format/Tcformat.c b/src/Format/Tcformat.c
index 2df69aeb..a159ca73 100644
--- a/src/Format/Tcformat.c
+++ b/src/Format/Tcformat.c
Binary files differ