mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-12 03:18:26 -06:00
Normalize all line terminators
This commit is contained in:
@@ -1,33 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
<asmv3:application>
|
||||
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
|
||||
<dpiAware>true</dpiAware>
|
||||
</asmv3:windowsSettings>
|
||||
</asmv3:application>
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
|
||||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
|
||||
</application>
|
||||
</compatibility>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="*"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
<asmv3:application>
|
||||
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
|
||||
<dpiAware>true</dpiAware>
|
||||
</asmv3:windowsSettings>
|
||||
</asmv3:application>
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
|
||||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
|
||||
</application>
|
||||
</compatibility>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="*"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
</assembly>
|
||||
1494
src/Format/Format.rc
1494
src/Format/Format.rc
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,248 +1,248 @@
|
||||
/*
|
||||
Derived from source code of TrueCrypt 7.1a, which is
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 IDRIX
|
||||
and are governed by the Apache License 2.0 the full text of which is
|
||||
contained in the file License.txt included in VeraCrypt binary and source
|
||||
code distribution packages.
|
||||
*/
|
||||
|
||||
#include <atlcomcli.h>
|
||||
#include <atlconv.h>
|
||||
#include <comutil.h>
|
||||
#include <windows.h>
|
||||
#include "BaseCom.h"
|
||||
#include "BootEncryption.h"
|
||||
#include "Dlgcode.h"
|
||||
#include "Format.h"
|
||||
#include "Progress.h"
|
||||
#include "TcFormat.h"
|
||||
#include "FormatCom.h"
|
||||
#include "FormatCom_h.h"
|
||||
#include "FormatCom_i.c"
|
||||
|
||||
using namespace VeraCrypt;
|
||||
|
||||
static volatile LONG ObjectCount = 0;
|
||||
|
||||
class TrueCryptFormatCom : public ITrueCryptFormatCom
|
||||
{
|
||||
|
||||
public:
|
||||
TrueCryptFormatCom (DWORD messageThreadId) : RefCount (0),
|
||||
MessageThreadId (messageThreadId),
|
||||
CallBack (NULL)
|
||||
{
|
||||
InterlockedIncrement (&ObjectCount);
|
||||
}
|
||||
|
||||
virtual ~TrueCryptFormatCom ()
|
||||
{
|
||||
if (InterlockedDecrement (&ObjectCount) == 0)
|
||||
PostThreadMessage (MessageThreadId, WM_APP, 0, 0);
|
||||
}
|
||||
|
||||
virtual ULONG STDMETHODCALLTYPE AddRef ()
|
||||
{
|
||||
return InterlockedIncrement (&RefCount);
|
||||
}
|
||||
|
||||
virtual ULONG STDMETHODCALLTYPE Release ()
|
||||
{
|
||||
if (!InterlockedDecrement (&RefCount))
|
||||
{
|
||||
delete this;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return RefCount;
|
||||
}
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE QueryInterface (REFIID riid, void **ppvObject)
|
||||
{
|
||||
if (riid == IID_IUnknown || riid == IID_ITrueCryptFormatCom)
|
||||
*ppvObject = this;
|
||||
else
|
||||
{
|
||||
*ppvObject = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
AddRef ();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
virtual DWORD STDMETHODCALLTYPE CallDriver (DWORD ioctl, BSTR input, BSTR *output)
|
||||
{
|
||||
return BaseCom::CallDriver (ioctl, input, output);
|
||||
}
|
||||
|
||||
virtual DWORD STDMETHODCALLTYPE CopyFile (BSTR sourceFile, BSTR destinationFile)
|
||||
{
|
||||
return BaseCom::CopyFile (sourceFile, destinationFile);
|
||||
}
|
||||
|
||||
virtual DWORD STDMETHODCALLTYPE DeleteFile (BSTR file)
|
||||
{
|
||||
return BaseCom::DeleteFile (file);
|
||||
}
|
||||
|
||||
virtual BOOL STDMETHODCALLTYPE FormatNtfs (int driveNo, int clusterSize)
|
||||
{
|
||||
return ::FormatNtfs (driveNo, clusterSize);
|
||||
}
|
||||
|
||||
virtual int STDMETHODCALLTYPE AnalyzeHiddenVolumeHost (
|
||||
LONG_PTR hwndDlg, int *driveNo, __int64 hiddenVolHostSize, int *realClusterSize, __int64 *nbrFreeClusters)
|
||||
{
|
||||
return ::AnalyzeHiddenVolumeHost (
|
||||
(HWND) hwndDlg, driveNo, hiddenVolHostSize, realClusterSize, nbrFreeClusters);
|
||||
}
|
||||
|
||||
virtual DWORD STDMETHODCALLTYPE ReadWriteFile (BOOL write, BOOL device, BSTR filePath, BSTR *bufferBstr, unsigned __int64 offset, unsigned __int32 size, DWORD *sizeDone)
|
||||
{
|
||||
return BaseCom::ReadWriteFile (write, device, filePath, bufferBstr, offset, size, sizeDone);
|
||||
}
|
||||
|
||||
virtual DWORD STDMETHODCALLTYPE RegisterFilterDriver (BOOL registerDriver, int filterType)
|
||||
{
|
||||
return BaseCom::RegisterFilterDriver (registerDriver, filterType);
|
||||
}
|
||||
|
||||
virtual DWORD STDMETHODCALLTYPE RegisterSystemFavoritesService (BOOL registerService)
|
||||
{
|
||||
return BaseCom::RegisterSystemFavoritesService (registerService);
|
||||
}
|
||||
|
||||
virtual DWORD STDMETHODCALLTYPE SetDriverServiceStartType (DWORD startType)
|
||||
{
|
||||
return BaseCom::SetDriverServiceStartType (startType);
|
||||
}
|
||||
|
||||
virtual BOOL STDMETHODCALLTYPE IsPagingFileActive (BOOL checkNonWindowsPartitionsOnly)
|
||||
{
|
||||
return BaseCom::IsPagingFileActive (checkNonWindowsPartitionsOnly);
|
||||
}
|
||||
|
||||
virtual DWORD STDMETHODCALLTYPE WriteLocalMachineRegistryDwordValue (BSTR keyPath, BSTR valueName, DWORD value)
|
||||
{
|
||||
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;
|
||||
ITrueCryptFormatCom *CallBack;
|
||||
};
|
||||
|
||||
|
||||
extern "C" BOOL ComServerFormat ()
|
||||
{
|
||||
SetProcessShutdownParameters (0x100, 0);
|
||||
|
||||
TrueCryptFactory<TrueCryptFormatCom> factory (GetCurrentThreadId ());
|
||||
DWORD cookie;
|
||||
|
||||
if (IsUacSupported ())
|
||||
UacElevated = TRUE;
|
||||
|
||||
if (CoRegisterClassObject (CLSID_TrueCryptFormatCom, (LPUNKNOWN) &factory,
|
||||
CLSCTX_LOCAL_SERVER, REGCLS_SINGLEUSE, &cookie) != S_OK)
|
||||
return FALSE;
|
||||
|
||||
MSG msg;
|
||||
while (int r = GetMessageW (&msg, NULL, 0, 0))
|
||||
{
|
||||
if (r == -1)
|
||||
return FALSE;
|
||||
|
||||
TranslateMessage (&msg);
|
||||
DispatchMessageW (&msg);
|
||||
|
||||
if (msg.message == WM_APP
|
||||
&& ObjectCount < 1
|
||||
&& !factory.IsServerLocked ())
|
||||
break;
|
||||
}
|
||||
CoRevokeClassObject (cookie);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static BOOL ComGetInstance (HWND hWnd, ITrueCryptFormatCom **tcServer)
|
||||
{
|
||||
return ComGetInstanceBase (hWnd, CLSID_TrueCryptFormatCom, IID_ITrueCryptFormatCom, (void **) tcServer);
|
||||
}
|
||||
|
||||
|
||||
ITrueCryptFormatCom *GetElevatedInstance (HWND parent)
|
||||
{
|
||||
ITrueCryptFormatCom *instance;
|
||||
|
||||
if (!ComGetInstance (parent, &instance))
|
||||
throw UserAbort (SRC_POS);
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
extern "C" int UacFormatNtfs (HWND hWnd, int driveNo, int clusterSize)
|
||||
{
|
||||
CComPtr<ITrueCryptFormatCom> tc;
|
||||
int r;
|
||||
|
||||
CoInitialize (NULL);
|
||||
|
||||
if (ComGetInstance (hWnd, &tc))
|
||||
r = tc->FormatNtfs (driveNo, clusterSize);
|
||||
else
|
||||
r = 0;
|
||||
|
||||
CoUninitialize ();
|
||||
|
||||
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)
|
||||
{
|
||||
CComPtr<ITrueCryptFormatCom> tc;
|
||||
int r;
|
||||
|
||||
CoInitialize (NULL);
|
||||
|
||||
if (ComGetInstance (hwndDlg, &tc))
|
||||
r = tc->AnalyzeHiddenVolumeHost ((LONG_PTR) hwndDlg, driveNo, hiddenVolHostSize, realClusterSize, nbrFreeClusters);
|
||||
else
|
||||
r = 0;
|
||||
|
||||
CoUninitialize ();
|
||||
|
||||
return r;
|
||||
}
|
||||
/*
|
||||
Derived from source code of TrueCrypt 7.1a, which is
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 IDRIX
|
||||
and are governed by the Apache License 2.0 the full text of which is
|
||||
contained in the file License.txt included in VeraCrypt binary and source
|
||||
code distribution packages.
|
||||
*/
|
||||
|
||||
#include <atlcomcli.h>
|
||||
#include <atlconv.h>
|
||||
#include <comutil.h>
|
||||
#include <windows.h>
|
||||
#include "BaseCom.h"
|
||||
#include "BootEncryption.h"
|
||||
#include "Dlgcode.h"
|
||||
#include "Format.h"
|
||||
#include "Progress.h"
|
||||
#include "TcFormat.h"
|
||||
#include "FormatCom.h"
|
||||
#include "FormatCom_h.h"
|
||||
#include "FormatCom_i.c"
|
||||
|
||||
using namespace VeraCrypt;
|
||||
|
||||
static volatile LONG ObjectCount = 0;
|
||||
|
||||
class TrueCryptFormatCom : public ITrueCryptFormatCom
|
||||
{
|
||||
|
||||
public:
|
||||
TrueCryptFormatCom (DWORD messageThreadId) : RefCount (0),
|
||||
MessageThreadId (messageThreadId),
|
||||
CallBack (NULL)
|
||||
{
|
||||
InterlockedIncrement (&ObjectCount);
|
||||
}
|
||||
|
||||
virtual ~TrueCryptFormatCom ()
|
||||
{
|
||||
if (InterlockedDecrement (&ObjectCount) == 0)
|
||||
PostThreadMessage (MessageThreadId, WM_APP, 0, 0);
|
||||
}
|
||||
|
||||
virtual ULONG STDMETHODCALLTYPE AddRef ()
|
||||
{
|
||||
return InterlockedIncrement (&RefCount);
|
||||
}
|
||||
|
||||
virtual ULONG STDMETHODCALLTYPE Release ()
|
||||
{
|
||||
if (!InterlockedDecrement (&RefCount))
|
||||
{
|
||||
delete this;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return RefCount;
|
||||
}
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE QueryInterface (REFIID riid, void **ppvObject)
|
||||
{
|
||||
if (riid == IID_IUnknown || riid == IID_ITrueCryptFormatCom)
|
||||
*ppvObject = this;
|
||||
else
|
||||
{
|
||||
*ppvObject = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
AddRef ();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
virtual DWORD STDMETHODCALLTYPE CallDriver (DWORD ioctl, BSTR input, BSTR *output)
|
||||
{
|
||||
return BaseCom::CallDriver (ioctl, input, output);
|
||||
}
|
||||
|
||||
virtual DWORD STDMETHODCALLTYPE CopyFile (BSTR sourceFile, BSTR destinationFile)
|
||||
{
|
||||
return BaseCom::CopyFile (sourceFile, destinationFile);
|
||||
}
|
||||
|
||||
virtual DWORD STDMETHODCALLTYPE DeleteFile (BSTR file)
|
||||
{
|
||||
return BaseCom::DeleteFile (file);
|
||||
}
|
||||
|
||||
virtual BOOL STDMETHODCALLTYPE FormatNtfs (int driveNo, int clusterSize)
|
||||
{
|
||||
return ::FormatNtfs (driveNo, clusterSize);
|
||||
}
|
||||
|
||||
virtual int STDMETHODCALLTYPE AnalyzeHiddenVolumeHost (
|
||||
LONG_PTR hwndDlg, int *driveNo, __int64 hiddenVolHostSize, int *realClusterSize, __int64 *nbrFreeClusters)
|
||||
{
|
||||
return ::AnalyzeHiddenVolumeHost (
|
||||
(HWND) hwndDlg, driveNo, hiddenVolHostSize, realClusterSize, nbrFreeClusters);
|
||||
}
|
||||
|
||||
virtual DWORD STDMETHODCALLTYPE ReadWriteFile (BOOL write, BOOL device, BSTR filePath, BSTR *bufferBstr, unsigned __int64 offset, unsigned __int32 size, DWORD *sizeDone)
|
||||
{
|
||||
return BaseCom::ReadWriteFile (write, device, filePath, bufferBstr, offset, size, sizeDone);
|
||||
}
|
||||
|
||||
virtual DWORD STDMETHODCALLTYPE RegisterFilterDriver (BOOL registerDriver, int filterType)
|
||||
{
|
||||
return BaseCom::RegisterFilterDriver (registerDriver, filterType);
|
||||
}
|
||||
|
||||
virtual DWORD STDMETHODCALLTYPE RegisterSystemFavoritesService (BOOL registerService)
|
||||
{
|
||||
return BaseCom::RegisterSystemFavoritesService (registerService);
|
||||
}
|
||||
|
||||
virtual DWORD STDMETHODCALLTYPE SetDriverServiceStartType (DWORD startType)
|
||||
{
|
||||
return BaseCom::SetDriverServiceStartType (startType);
|
||||
}
|
||||
|
||||
virtual BOOL STDMETHODCALLTYPE IsPagingFileActive (BOOL checkNonWindowsPartitionsOnly)
|
||||
{
|
||||
return BaseCom::IsPagingFileActive (checkNonWindowsPartitionsOnly);
|
||||
}
|
||||
|
||||
virtual DWORD STDMETHODCALLTYPE WriteLocalMachineRegistryDwordValue (BSTR keyPath, BSTR valueName, DWORD value)
|
||||
{
|
||||
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;
|
||||
ITrueCryptFormatCom *CallBack;
|
||||
};
|
||||
|
||||
|
||||
extern "C" BOOL ComServerFormat ()
|
||||
{
|
||||
SetProcessShutdownParameters (0x100, 0);
|
||||
|
||||
TrueCryptFactory<TrueCryptFormatCom> factory (GetCurrentThreadId ());
|
||||
DWORD cookie;
|
||||
|
||||
if (IsUacSupported ())
|
||||
UacElevated = TRUE;
|
||||
|
||||
if (CoRegisterClassObject (CLSID_TrueCryptFormatCom, (LPUNKNOWN) &factory,
|
||||
CLSCTX_LOCAL_SERVER, REGCLS_SINGLEUSE, &cookie) != S_OK)
|
||||
return FALSE;
|
||||
|
||||
MSG msg;
|
||||
while (int r = GetMessageW (&msg, NULL, 0, 0))
|
||||
{
|
||||
if (r == -1)
|
||||
return FALSE;
|
||||
|
||||
TranslateMessage (&msg);
|
||||
DispatchMessageW (&msg);
|
||||
|
||||
if (msg.message == WM_APP
|
||||
&& ObjectCount < 1
|
||||
&& !factory.IsServerLocked ())
|
||||
break;
|
||||
}
|
||||
CoRevokeClassObject (cookie);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static BOOL ComGetInstance (HWND hWnd, ITrueCryptFormatCom **tcServer)
|
||||
{
|
||||
return ComGetInstanceBase (hWnd, CLSID_TrueCryptFormatCom, IID_ITrueCryptFormatCom, (void **) tcServer);
|
||||
}
|
||||
|
||||
|
||||
ITrueCryptFormatCom *GetElevatedInstance (HWND parent)
|
||||
{
|
||||
ITrueCryptFormatCom *instance;
|
||||
|
||||
if (!ComGetInstance (parent, &instance))
|
||||
throw UserAbort (SRC_POS);
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
extern "C" int UacFormatNtfs (HWND hWnd, int driveNo, int clusterSize)
|
||||
{
|
||||
CComPtr<ITrueCryptFormatCom> tc;
|
||||
int r;
|
||||
|
||||
CoInitialize (NULL);
|
||||
|
||||
if (ComGetInstance (hWnd, &tc))
|
||||
r = tc->FormatNtfs (driveNo, clusterSize);
|
||||
else
|
||||
r = 0;
|
||||
|
||||
CoUninitialize ();
|
||||
|
||||
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)
|
||||
{
|
||||
CComPtr<ITrueCryptFormatCom> tc;
|
||||
int r;
|
||||
|
||||
CoInitialize (NULL);
|
||||
|
||||
if (ComGetInstance (hwndDlg, &tc))
|
||||
r = tc->AnalyzeHiddenVolumeHost ((LONG_PTR) hwndDlg, driveNo, hiddenVolHostSize, realClusterSize, nbrFreeClusters);
|
||||
else
|
||||
r = 0;
|
||||
|
||||
CoUninitialize ();
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
@@ -1,37 +1,37 @@
|
||||
/*
|
||||
Derived from source code of TrueCrypt 7.1a, which is
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 IDRIX
|
||||
and are governed by the Apache License 2.0 the full text of which is
|
||||
contained in the file License.txt included in VeraCrypt binary and source
|
||||
code distribution packages.
|
||||
*/
|
||||
|
||||
#ifndef TC_HEADER_FORMAT_COM
|
||||
#define TC_HEADER_FORMAT_COM
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include "FormatCom_h.h"
|
||||
ITrueCryptFormatCom *GetElevatedInstance (HWND parent);
|
||||
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
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);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
Derived from source code of TrueCrypt 7.1a, which is
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 IDRIX
|
||||
and are governed by the Apache License 2.0 the full text of which is
|
||||
contained in the file License.txt included in VeraCrypt binary and source
|
||||
code distribution packages.
|
||||
*/
|
||||
|
||||
#ifndef TC_HEADER_FORMAT_COM
|
||||
#define TC_HEADER_FORMAT_COM
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include "FormatCom_h.h"
|
||||
ITrueCryptFormatCom *GetElevatedInstance (HWND parent);
|
||||
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
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);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // TC_HEADER_FORMAT_COM
|
||||
@@ -1,53 +1,53 @@
|
||||
/*
|
||||
Derived from source code of TrueCrypt 7.1a, which is
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 IDRIX
|
||||
and are governed by the Apache License 2.0 the full text of which is
|
||||
contained in the file License.txt included in VeraCrypt binary and source
|
||||
code distribution packages.
|
||||
*/
|
||||
|
||||
import "wtypes.idl";
|
||||
import "..\Common\Password.h";
|
||||
|
||||
[
|
||||
uuid(56327DDA-F1A7-4e13-B128-520D129BDEF6),
|
||||
helpstring("VeraCrypt Format UAC Support Library"),
|
||||
version(2.5) // Update ComSetup.cpp when changing version number
|
||||
]
|
||||
library TrueCryptFormatCom
|
||||
{
|
||||
[
|
||||
uuid(7AB357D9-A17F-466e-BCD6-F49E97C218D8),
|
||||
object,
|
||||
oleautomation,
|
||||
helpstring("VeraCrypt Format UAC Support Interface")
|
||||
]
|
||||
interface ITrueCryptFormatCom : IUnknown
|
||||
{
|
||||
int AnalyzeHiddenVolumeHost (LONG_PTR hwndDlg, int *driveNo, __int64 hiddenVolHostSize, int *realClusterSize, __int64 *nbrFreeClusters);
|
||||
DWORD CallDriver (DWORD ioctl, BSTR input, BSTR *output);
|
||||
DWORD CopyFile (BSTR sourceFile, BSTR destinationFile);
|
||||
DWORD DeleteFile (BSTR file);
|
||||
BOOL FormatNtfs (int driveNo, int clusterSize);
|
||||
BOOL IsPagingFileActive (BOOL checkNonWindowsPartitionsOnly);
|
||||
DWORD ReadWriteFile (BOOL write, BOOL device, BSTR filePath, BSTR *bufferBstr, unsigned __int64 offset, unsigned __int32 size, DWORD *sizeDone);
|
||||
DWORD RegisterFilterDriver (BOOL registerDriver, int filterType);
|
||||
DWORD RegisterSystemFavoritesService (BOOL registerService);
|
||||
DWORD SetDriverServiceStartType (DWORD startType);
|
||||
DWORD WriteLocalMachineRegistryDwordValue (BSTR keyPath, BSTR valueName, DWORD value);
|
||||
BOOL FormatFs (int driveNo, int clusterSize, int fsType);
|
||||
};
|
||||
|
||||
[
|
||||
uuid(A96D3797-9F31-49f4-A0CE-9657392CF789),
|
||||
helpstring("VeraCrypt Format UAC Support Coclass")
|
||||
]
|
||||
coclass TrueCryptFormatCom
|
||||
{
|
||||
[default] interface ITrueCryptFormatCom;
|
||||
}
|
||||
}
|
||||
/*
|
||||
Derived from source code of TrueCrypt 7.1a, which is
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 IDRIX
|
||||
and are governed by the Apache License 2.0 the full text of which is
|
||||
contained in the file License.txt included in VeraCrypt binary and source
|
||||
code distribution packages.
|
||||
*/
|
||||
|
||||
import "wtypes.idl";
|
||||
import "..\Common\Password.h";
|
||||
|
||||
[
|
||||
uuid(56327DDA-F1A7-4e13-B128-520D129BDEF6),
|
||||
helpstring("VeraCrypt Format UAC Support Library"),
|
||||
version(2.5) // Update ComSetup.cpp when changing version number
|
||||
]
|
||||
library TrueCryptFormatCom
|
||||
{
|
||||
[
|
||||
uuid(7AB357D9-A17F-466e-BCD6-F49E97C218D8),
|
||||
object,
|
||||
oleautomation,
|
||||
helpstring("VeraCrypt Format UAC Support Interface")
|
||||
]
|
||||
interface ITrueCryptFormatCom : IUnknown
|
||||
{
|
||||
int AnalyzeHiddenVolumeHost (LONG_PTR hwndDlg, int *driveNo, __int64 hiddenVolHostSize, int *realClusterSize, __int64 *nbrFreeClusters);
|
||||
DWORD CallDriver (DWORD ioctl, BSTR input, BSTR *output);
|
||||
DWORD CopyFile (BSTR sourceFile, BSTR destinationFile);
|
||||
DWORD DeleteFile (BSTR file);
|
||||
BOOL FormatNtfs (int driveNo, int clusterSize);
|
||||
BOOL IsPagingFileActive (BOOL checkNonWindowsPartitionsOnly);
|
||||
DWORD ReadWriteFile (BOOL write, BOOL device, BSTR filePath, BSTR *bufferBstr, unsigned __int64 offset, unsigned __int32 size, DWORD *sizeDone);
|
||||
DWORD RegisterFilterDriver (BOOL registerDriver, int filterType);
|
||||
DWORD RegisterSystemFavoritesService (BOOL registerService);
|
||||
DWORD SetDriverServiceStartType (DWORD startType);
|
||||
DWORD WriteLocalMachineRegistryDwordValue (BSTR keyPath, BSTR valueName, DWORD value);
|
||||
BOOL FormatFs (int driveNo, int clusterSize, int fsType);
|
||||
};
|
||||
|
||||
[
|
||||
uuid(A96D3797-9F31-49f4-A0CE-9657392CF789),
|
||||
helpstring("VeraCrypt Format UAC Support Coclass")
|
||||
]
|
||||
coclass TrueCryptFormatCom
|
||||
{
|
||||
[default] interface ITrueCryptFormatCom;
|
||||
}
|
||||
}
|
||||
|
||||
4586
src/Format/InPlace.c
4586
src/Format/InPlace.c
File diff suppressed because it is too large
Load Diff
@@ -1,52 +1,52 @@
|
||||
/*
|
||||
Derived from source code of TrueCrypt 7.1a, which is
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 IDRIX
|
||||
and are governed by the Apache License 2.0 the full text of which is
|
||||
contained in the file License.txt included in VeraCrypt binary and source
|
||||
code distribution packages.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "Format.h"
|
||||
|
||||
enum nonsys_inplace_enc_status
|
||||
{
|
||||
NONSYS_INPLACE_ENC_STATUS_NONE = 0,
|
||||
NONSYS_INPLACE_ENC_STATUS_PREPARING,
|
||||
NONSYS_INPLACE_ENC_STATUS_RESIZING,
|
||||
NONSYS_INPLACE_ENC_STATUS_ENCRYPTING,
|
||||
NONSYS_INPLACE_ENC_STATUS_DECRYPTING,
|
||||
NONSYS_INPLACE_ENC_STATUS_FINALIZING,
|
||||
NONSYS_INPLACE_ENC_STATUS_PAUSED,
|
||||
NONSYS_INPLACE_ENC_STATUS_FINISHED,
|
||||
NONSYS_INPLACE_ENC_STATUS_ERROR
|
||||
};
|
||||
|
||||
BOOL CheckRequirementsForNonSysInPlaceEnc (HWND hwndDlg, const wchar_t *devicePath, BOOL silent);
|
||||
BOOL CheckRequirementsForNonSysInPlaceDec (HWND hwndDlg, const wchar_t *devicePath, BOOL silent);
|
||||
int EncryptPartitionInPlaceBegin (volatile FORMAT_VOL_PARAMETERS *volParams, volatile HANDLE *outHandle, WipeAlgorithmId wipeAlgorithm);
|
||||
int EncryptPartitionInPlaceResume (HANDLE dev, volatile FORMAT_VOL_PARAMETERS *volParams, WipeAlgorithmId wipeAlgorithm, volatile BOOL *bTryToCorrectReadErrors);
|
||||
int DecryptPartitionInPlace (volatile FORMAT_VOL_PARAMETERS *volParams, volatile BOOL *DiscardUnreadableEncryptedSectors);
|
||||
void ShowInPlaceEncErrMsgWAltSteps (HWND hwndDlg, char *iniStrId, BOOL bErr);
|
||||
void SetNonSysInplaceEncUIStatus (int nonSysInplaceEncStatus);
|
||||
int FastVolumeHeaderUpdate (HANDLE dev, CRYPTO_INFO *headerCryptoInfo, CRYPTO_INFO *masterCryptoInfo, __int64 deviceSize);
|
||||
|
||||
static HANDLE OpenPartitionVolume (HWND hwndDlg, const wchar_t *devName, BOOL bExclusiveRequired, BOOL bSharedRequired, BOOL bSharedRequiresConfirmation, BOOL bShowAlternativeSteps, BOOL bSilent);
|
||||
static int DismountFileSystem (HWND hwndDlg, HANDLE dev, int driveLetter, BOOL bForcedAllowed, BOOL bForcedRequiresConfirmation, BOOL bSilent);
|
||||
static int ConcealNTFS (HANDLE dev);
|
||||
BOOL SaveNonSysInPlaceEncSettings (int delta, WipeAlgorithmId wipeAlgorithm, BOOL bDecrypting);
|
||||
static void ExportProgressStats (__int64 bytesDone, __int64 totalSize);
|
||||
int ZeroUnreadableSectors (HANDLE dev, LARGE_INTEGER startOffset, int64 size, int sectorSize, uint64 *zeroedSectorCount);
|
||||
static int OpenBackupHeader (HANDLE dev, const wchar_t *devicePath, Password *password, int pkcs5, int pim, PCRYPTO_INFO *retCryptoInfo, CRYPTO_INFO *headerCryptoInfo, __int64 deviceSize);
|
||||
BOOL MoveClustersBeforeThreshold (HANDLE volumeHandle, PWSTR volumeDevicePath, int64 clusterThreshold);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
Derived from source code of TrueCrypt 7.1a, which is
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 IDRIX
|
||||
and are governed by the Apache License 2.0 the full text of which is
|
||||
contained in the file License.txt included in VeraCrypt binary and source
|
||||
code distribution packages.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "Format.h"
|
||||
|
||||
enum nonsys_inplace_enc_status
|
||||
{
|
||||
NONSYS_INPLACE_ENC_STATUS_NONE = 0,
|
||||
NONSYS_INPLACE_ENC_STATUS_PREPARING,
|
||||
NONSYS_INPLACE_ENC_STATUS_RESIZING,
|
||||
NONSYS_INPLACE_ENC_STATUS_ENCRYPTING,
|
||||
NONSYS_INPLACE_ENC_STATUS_DECRYPTING,
|
||||
NONSYS_INPLACE_ENC_STATUS_FINALIZING,
|
||||
NONSYS_INPLACE_ENC_STATUS_PAUSED,
|
||||
NONSYS_INPLACE_ENC_STATUS_FINISHED,
|
||||
NONSYS_INPLACE_ENC_STATUS_ERROR
|
||||
};
|
||||
|
||||
BOOL CheckRequirementsForNonSysInPlaceEnc (HWND hwndDlg, const wchar_t *devicePath, BOOL silent);
|
||||
BOOL CheckRequirementsForNonSysInPlaceDec (HWND hwndDlg, const wchar_t *devicePath, BOOL silent);
|
||||
int EncryptPartitionInPlaceBegin (volatile FORMAT_VOL_PARAMETERS *volParams, volatile HANDLE *outHandle, WipeAlgorithmId wipeAlgorithm);
|
||||
int EncryptPartitionInPlaceResume (HANDLE dev, volatile FORMAT_VOL_PARAMETERS *volParams, WipeAlgorithmId wipeAlgorithm, volatile BOOL *bTryToCorrectReadErrors);
|
||||
int DecryptPartitionInPlace (volatile FORMAT_VOL_PARAMETERS *volParams, volatile BOOL *DiscardUnreadableEncryptedSectors);
|
||||
void ShowInPlaceEncErrMsgWAltSteps (HWND hwndDlg, char *iniStrId, BOOL bErr);
|
||||
void SetNonSysInplaceEncUIStatus (int nonSysInplaceEncStatus);
|
||||
int FastVolumeHeaderUpdate (HANDLE dev, CRYPTO_INFO *headerCryptoInfo, CRYPTO_INFO *masterCryptoInfo, __int64 deviceSize);
|
||||
|
||||
static HANDLE OpenPartitionVolume (HWND hwndDlg, const wchar_t *devName, BOOL bExclusiveRequired, BOOL bSharedRequired, BOOL bSharedRequiresConfirmation, BOOL bShowAlternativeSteps, BOOL bSilent);
|
||||
static int DismountFileSystem (HWND hwndDlg, HANDLE dev, int driveLetter, BOOL bForcedAllowed, BOOL bForcedRequiresConfirmation, BOOL bSilent);
|
||||
static int ConcealNTFS (HANDLE dev);
|
||||
BOOL SaveNonSysInPlaceEncSettings (int delta, WipeAlgorithmId wipeAlgorithm, BOOL bDecrypting);
|
||||
static void ExportProgressStats (__int64 bytesDone, __int64 totalSize);
|
||||
int ZeroUnreadableSectors (HANDLE dev, LARGE_INTEGER startOffset, int64 size, int sectorSize, uint64 *zeroedSectorCount);
|
||||
static int OpenBackupHeader (HANDLE dev, const wchar_t *devicePath, Password *password, int pkcs5, int pim, PCRYPTO_INFO *retCryptoInfo, CRYPTO_INFO *headerCryptoInfo, __int64 deviceSize);
|
||||
BOOL MoveClustersBeforeThreshold (HANDLE volumeHandle, PWSTR volumeDevicePath, int64 clusterThreshold);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,159 +1,159 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by Format.rc
|
||||
//
|
||||
#define IDR_FORMAT_TLB 1
|
||||
#define IDD_VOL_CREATION_WIZARD_DLG 101
|
||||
#define IDD_CIPHER_PAGE_DLG 102
|
||||
#define IDD_SIZE_PAGE_DLG 103
|
||||
#define IDD_PASSWORD_PAGE_DLG 104
|
||||
#define IDD_VOLUME_LOCATION_PAGE_DLG 105
|
||||
#define IDD_FORMAT_PAGE_DLG 106
|
||||
#define IDD_INTRO_PAGE_DLG 107
|
||||
#define IDD_INFO_PAGE_DLG 108
|
||||
#define IDD_HIDVOL_HOST_FILL_PAGE_DLG 109
|
||||
#define IDD_HIDDEN_VOL_WIZARD_MODE_PAGE_DLG 110
|
||||
#define IDD_PASSWORD_ENTRY_PAGE_DLG 111
|
||||
#define IDS_UACSTRING_FMT 112
|
||||
#define IDD_VOLUME_TYPE_PAGE_DLG 113
|
||||
#define IDR_FORMAT_RSRC_HEADER 114
|
||||
#define IDD_SYSENC_SPAN_PAGE_DLG 115
|
||||
#define IDB_WIZARD 116
|
||||
#define IDD_SYSENC_RESCUE_DISK_CREATION_DLG 117
|
||||
#define IDD_SYSENC_COLLECTING_RANDOM_DATA_DLG 118
|
||||
#define IDD_SYSENC_MULTI_BOOT_MODE_PAGE_DLG 119
|
||||
#define IDD_SYSENC_RESCUE_DISK_BURN_PAGE_DLG 120
|
||||
#define IDD_SYSENC_WIPE_MODE_PAGE_DLG 121
|
||||
#define IDD_INPLACE_ENCRYPTION_PAGE_DLG 122
|
||||
#define IDD_SYSENC_KEYS_GEN_PAGE_DLG 123
|
||||
#define IDD_UNIVERSAL_DUAL_CHOICE_PAGE_DLG 124
|
||||
#define IDD_SYSENC_DRIVE_ANALYSIS_PAGE_DLG 125
|
||||
#define IDD_SYSENC_TYPE_PAGE_DLG 126
|
||||
#define IDD_SYSENC_HIDDEN_OS_REQ_CHECK_PAGE_DLG 127
|
||||
#define IDD_DEVICE_WIPE_PAGE_DLG 128
|
||||
#define IDD_DEVICE_WIPE_MODE_PAGE_DLG 129
|
||||
#define IDD_DEVICE_TRANSFORM_MODE_DLG 130
|
||||
#define IDD_EXPANDED_LIST_SELECT_PAGE_DLG 131
|
||||
#define IDD_DRIVE_LETTER_SELECTION_PAGE 132
|
||||
#define IDD_PIM_PAGE_DLG 133
|
||||
#define IDC_BOX_TITLE 1000
|
||||
#define IDC_RESCUE_DISK_ISO_PATH 1001
|
||||
#define IDC_COMBO_BOX 1002
|
||||
#define IDC_BOX_HELP 1003
|
||||
#define IDC_PASSWORD 1004
|
||||
#define IDC_BROWSE 1005
|
||||
#define IDC_BOX_HELP2 1006
|
||||
#define IDC_COMBO_BOX_HASH 1007
|
||||
#define IDC_COMBO_BOX_HASH_ALGO 1008
|
||||
#define IDC_SPACE_LEFT 1009
|
||||
#define IDC_VERIFY 1010
|
||||
#define IDC_KB 1011
|
||||
#define IDC_NO_HISTORY 1012
|
||||
#define IDC_MB 1013
|
||||
#define IDC_PROGRESS_BAR 1014
|
||||
#define IDC_GB 1015
|
||||
#define IDC_ABORT_BUTTON 1016
|
||||
#define IDC_HEADER_KEY 1017
|
||||
#define IDC_LIST_BOX 1018
|
||||
#define IDC_DISK_KEY 1019
|
||||
#define IDC_RANDOM_BYTES 1020
|
||||
#define IDC_CIPHER_TEST 1021
|
||||
#define IDC_BENCHMARK 1022
|
||||
#define IDC_QUICKFORMAT 1023
|
||||
#define IDC_BYTESWRITTEN 1024
|
||||
#define IDC_WRITESPEED 1025
|
||||
#define IDC_KEY_FILES 1026
|
||||
#define IDC_TIMEREMAIN 1027
|
||||
#define IDC_CLUSTERSIZE 1028
|
||||
#define IDC_FILESYS 1029
|
||||
#define IDC_SHOW_KEYS 1030
|
||||
#define IDC_STD_VOL 1031
|
||||
#define IDC_HIDDEN_VOL 1032
|
||||
#define IDC_HIDDEN_VOL_HELP 1033
|
||||
#define IDC_OPEN_OUTER_VOLUME 1034
|
||||
#define IDC_HIDVOL_WIZ_MODE_FULL 1035
|
||||
#define IDC_HIDVOL_WIZ_MODE_DIRECT 1036
|
||||
#define IDC_PASSWORD_DIRECT 1037
|
||||
#define IDC_SIZEBOX 1038
|
||||
#define IDC_SELECT_VOLUME_LOCATION 1039
|
||||
#define IDC_NEXT 1040
|
||||
#define IDC_PREV 1041
|
||||
#define IDT_ENCRYPTION_ALGO 1042
|
||||
#define IDT_HASH_ALGO 1043
|
||||
#define IDT_FORMAT_OPTIONS 1044
|
||||
#define IDT_FILESYSTEM 1045
|
||||
#define IDT_CLUSTER 1046
|
||||
#define IDT_RANDOM_POOL 1047
|
||||
#define IDT_HEADER_KEY 1048
|
||||
#define IDT_MASTER_KEY 1049
|
||||
#define IDT_DONE 1050
|
||||
#define IDT_SPEED 1051
|
||||
#define IDT_LEFT 1052
|
||||
#define IDT_CONFIRM 1053
|
||||
#define IDT_PASSWORD 1054
|
||||
#define IDC_SHOW_PASSWORD_SINGLE 1055
|
||||
#define IDC_SHOW_PASSWORD 1056
|
||||
#define IDC_LINK_MORE_INFO_ABOUT_CIPHER 1057
|
||||
#define IDC_LINK_HASH_INFO 1058
|
||||
#define IDC_POS_BOX 1059
|
||||
#define IDC_BITMAP_WIZARD 1060
|
||||
#define IDC_FILE_CONTAINER 1061
|
||||
#define IDC_NONSYS_DEVICE 1062
|
||||
#define IDC_SYS_DEVICE 1063
|
||||
#define IDT_FILE_CONTAINER 1064
|
||||
#define IDT_NON_SYS_DEVICE 1065
|
||||
#define IDT_SYS_DEVICE 1066
|
||||
#define IDC_WHOLE_SYS_DRIVE 1067
|
||||
#define IDC_SYS_PARTITION 1068
|
||||
#define IDT_WHOLE_SYS_DRIVE 1069
|
||||
#define IDT_SYS_PARTITION 1070
|
||||
#define IDT_RESCUE_DISK_INFO 1071
|
||||
#define IDC_MORE_INFO 1072
|
||||
#define IDC_MORE_INFO_ON_SYS_ENCRYPTION 1073
|
||||
#define IDT_COLLECTING_RANDOM_DATA_NOTE 1074
|
||||
#define IDC_MORE_INFO_ON_CONTAINERS 1075
|
||||
#define IDC_SINGLE_BOOT 1076
|
||||
#define IDC_MULTI_BOOT 1077
|
||||
#define IDT_MULTI_BOOT 1078
|
||||
#define IDT_SINGLE_BOOT 1079
|
||||
#define IDC_SYS_POOL_CONTENTS 1080
|
||||
#define IDT_PARTIAL_POOL_CONTENTS 1081
|
||||
#define IDC_DOWNLOAD_CD_BURN_SOFTWARE 1082
|
||||
#define IDT_RESCUE_DISK_BURN_INFO 1083
|
||||
#define IDT_WIPE_MODE_INFO 1084
|
||||
#define IDC_WIPE_MODE 1085
|
||||
#define IDC_SELECT 1086
|
||||
#define IDT_SYSENC_KEYS_GEN_INFO 1087
|
||||
#define IDC_DISPLAY_KEYS 1088
|
||||
#define IDC_PAUSE 1089
|
||||
#define IDT_WIPE_MODE 1090
|
||||
#define IDC_MORE_INFO_SYS_ENCRYPTION 1091
|
||||
#define IDC_BOX_HELP_NORMAL_VOL 1092
|
||||
#define IDT_STATUS 1093
|
||||
#define IDT_PROGRESS 1094
|
||||
#define IDT_SYSENC_DRIVE_ANALYSIS_INFO 1095
|
||||
#define IDC_SYSENC_NORMAL 1096
|
||||
#define IDC_SYSENC_HIDDEN 1097
|
||||
#define IDC_BOX_HELP_SYSENC_NORMAL 1098
|
||||
#define IDC_HIDDEN_SYSENC_INFO_LINK 1099
|
||||
#define IDT_PASS 1100
|
||||
#define IDC_DEVICE_TRANSFORM_MODE_FORMAT 1101
|
||||
#define IDC_DEVICE_TRANSFORM_MODE_INPLACE 1102
|
||||
#define IDC_DRIVE_LETTER_LIST 1103
|
||||
#define IDT_DRIVE_LETTER 1104
|
||||
#define IDC_LINK_PIM_INFO 1105
|
||||
#define IDC_SHOW_PIM 1106
|
||||
#define IDC_TB 1107
|
||||
#define IDC_SKIP_RESCUE_VERIFICATION 1108
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NO_MFC 1
|
||||
#define _APS_NEXT_RESOURCE_VALUE 134
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1109
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by Format.rc
|
||||
//
|
||||
#define IDR_FORMAT_TLB 1
|
||||
#define IDD_VOL_CREATION_WIZARD_DLG 101
|
||||
#define IDD_CIPHER_PAGE_DLG 102
|
||||
#define IDD_SIZE_PAGE_DLG 103
|
||||
#define IDD_PASSWORD_PAGE_DLG 104
|
||||
#define IDD_VOLUME_LOCATION_PAGE_DLG 105
|
||||
#define IDD_FORMAT_PAGE_DLG 106
|
||||
#define IDD_INTRO_PAGE_DLG 107
|
||||
#define IDD_INFO_PAGE_DLG 108
|
||||
#define IDD_HIDVOL_HOST_FILL_PAGE_DLG 109
|
||||
#define IDD_HIDDEN_VOL_WIZARD_MODE_PAGE_DLG 110
|
||||
#define IDD_PASSWORD_ENTRY_PAGE_DLG 111
|
||||
#define IDS_UACSTRING_FMT 112
|
||||
#define IDD_VOLUME_TYPE_PAGE_DLG 113
|
||||
#define IDR_FORMAT_RSRC_HEADER 114
|
||||
#define IDD_SYSENC_SPAN_PAGE_DLG 115
|
||||
#define IDB_WIZARD 116
|
||||
#define IDD_SYSENC_RESCUE_DISK_CREATION_DLG 117
|
||||
#define IDD_SYSENC_COLLECTING_RANDOM_DATA_DLG 118
|
||||
#define IDD_SYSENC_MULTI_BOOT_MODE_PAGE_DLG 119
|
||||
#define IDD_SYSENC_RESCUE_DISK_BURN_PAGE_DLG 120
|
||||
#define IDD_SYSENC_WIPE_MODE_PAGE_DLG 121
|
||||
#define IDD_INPLACE_ENCRYPTION_PAGE_DLG 122
|
||||
#define IDD_SYSENC_KEYS_GEN_PAGE_DLG 123
|
||||
#define IDD_UNIVERSAL_DUAL_CHOICE_PAGE_DLG 124
|
||||
#define IDD_SYSENC_DRIVE_ANALYSIS_PAGE_DLG 125
|
||||
#define IDD_SYSENC_TYPE_PAGE_DLG 126
|
||||
#define IDD_SYSENC_HIDDEN_OS_REQ_CHECK_PAGE_DLG 127
|
||||
#define IDD_DEVICE_WIPE_PAGE_DLG 128
|
||||
#define IDD_DEVICE_WIPE_MODE_PAGE_DLG 129
|
||||
#define IDD_DEVICE_TRANSFORM_MODE_DLG 130
|
||||
#define IDD_EXPANDED_LIST_SELECT_PAGE_DLG 131
|
||||
#define IDD_DRIVE_LETTER_SELECTION_PAGE 132
|
||||
#define IDD_PIM_PAGE_DLG 133
|
||||
#define IDC_BOX_TITLE 1000
|
||||
#define IDC_RESCUE_DISK_ISO_PATH 1001
|
||||
#define IDC_COMBO_BOX 1002
|
||||
#define IDC_BOX_HELP 1003
|
||||
#define IDC_PASSWORD 1004
|
||||
#define IDC_BROWSE 1005
|
||||
#define IDC_BOX_HELP2 1006
|
||||
#define IDC_COMBO_BOX_HASH 1007
|
||||
#define IDC_COMBO_BOX_HASH_ALGO 1008
|
||||
#define IDC_SPACE_LEFT 1009
|
||||
#define IDC_VERIFY 1010
|
||||
#define IDC_KB 1011
|
||||
#define IDC_NO_HISTORY 1012
|
||||
#define IDC_MB 1013
|
||||
#define IDC_PROGRESS_BAR 1014
|
||||
#define IDC_GB 1015
|
||||
#define IDC_ABORT_BUTTON 1016
|
||||
#define IDC_HEADER_KEY 1017
|
||||
#define IDC_LIST_BOX 1018
|
||||
#define IDC_DISK_KEY 1019
|
||||
#define IDC_RANDOM_BYTES 1020
|
||||
#define IDC_CIPHER_TEST 1021
|
||||
#define IDC_BENCHMARK 1022
|
||||
#define IDC_QUICKFORMAT 1023
|
||||
#define IDC_BYTESWRITTEN 1024
|
||||
#define IDC_WRITESPEED 1025
|
||||
#define IDC_KEY_FILES 1026
|
||||
#define IDC_TIMEREMAIN 1027
|
||||
#define IDC_CLUSTERSIZE 1028
|
||||
#define IDC_FILESYS 1029
|
||||
#define IDC_SHOW_KEYS 1030
|
||||
#define IDC_STD_VOL 1031
|
||||
#define IDC_HIDDEN_VOL 1032
|
||||
#define IDC_HIDDEN_VOL_HELP 1033
|
||||
#define IDC_OPEN_OUTER_VOLUME 1034
|
||||
#define IDC_HIDVOL_WIZ_MODE_FULL 1035
|
||||
#define IDC_HIDVOL_WIZ_MODE_DIRECT 1036
|
||||
#define IDC_PASSWORD_DIRECT 1037
|
||||
#define IDC_SIZEBOX 1038
|
||||
#define IDC_SELECT_VOLUME_LOCATION 1039
|
||||
#define IDC_NEXT 1040
|
||||
#define IDC_PREV 1041
|
||||
#define IDT_ENCRYPTION_ALGO 1042
|
||||
#define IDT_HASH_ALGO 1043
|
||||
#define IDT_FORMAT_OPTIONS 1044
|
||||
#define IDT_FILESYSTEM 1045
|
||||
#define IDT_CLUSTER 1046
|
||||
#define IDT_RANDOM_POOL 1047
|
||||
#define IDT_HEADER_KEY 1048
|
||||
#define IDT_MASTER_KEY 1049
|
||||
#define IDT_DONE 1050
|
||||
#define IDT_SPEED 1051
|
||||
#define IDT_LEFT 1052
|
||||
#define IDT_CONFIRM 1053
|
||||
#define IDT_PASSWORD 1054
|
||||
#define IDC_SHOW_PASSWORD_SINGLE 1055
|
||||
#define IDC_SHOW_PASSWORD 1056
|
||||
#define IDC_LINK_MORE_INFO_ABOUT_CIPHER 1057
|
||||
#define IDC_LINK_HASH_INFO 1058
|
||||
#define IDC_POS_BOX 1059
|
||||
#define IDC_BITMAP_WIZARD 1060
|
||||
#define IDC_FILE_CONTAINER 1061
|
||||
#define IDC_NONSYS_DEVICE 1062
|
||||
#define IDC_SYS_DEVICE 1063
|
||||
#define IDT_FILE_CONTAINER 1064
|
||||
#define IDT_NON_SYS_DEVICE 1065
|
||||
#define IDT_SYS_DEVICE 1066
|
||||
#define IDC_WHOLE_SYS_DRIVE 1067
|
||||
#define IDC_SYS_PARTITION 1068
|
||||
#define IDT_WHOLE_SYS_DRIVE 1069
|
||||
#define IDT_SYS_PARTITION 1070
|
||||
#define IDT_RESCUE_DISK_INFO 1071
|
||||
#define IDC_MORE_INFO 1072
|
||||
#define IDC_MORE_INFO_ON_SYS_ENCRYPTION 1073
|
||||
#define IDT_COLLECTING_RANDOM_DATA_NOTE 1074
|
||||
#define IDC_MORE_INFO_ON_CONTAINERS 1075
|
||||
#define IDC_SINGLE_BOOT 1076
|
||||
#define IDC_MULTI_BOOT 1077
|
||||
#define IDT_MULTI_BOOT 1078
|
||||
#define IDT_SINGLE_BOOT 1079
|
||||
#define IDC_SYS_POOL_CONTENTS 1080
|
||||
#define IDT_PARTIAL_POOL_CONTENTS 1081
|
||||
#define IDC_DOWNLOAD_CD_BURN_SOFTWARE 1082
|
||||
#define IDT_RESCUE_DISK_BURN_INFO 1083
|
||||
#define IDT_WIPE_MODE_INFO 1084
|
||||
#define IDC_WIPE_MODE 1085
|
||||
#define IDC_SELECT 1086
|
||||
#define IDT_SYSENC_KEYS_GEN_INFO 1087
|
||||
#define IDC_DISPLAY_KEYS 1088
|
||||
#define IDC_PAUSE 1089
|
||||
#define IDT_WIPE_MODE 1090
|
||||
#define IDC_MORE_INFO_SYS_ENCRYPTION 1091
|
||||
#define IDC_BOX_HELP_NORMAL_VOL 1092
|
||||
#define IDT_STATUS 1093
|
||||
#define IDT_PROGRESS 1094
|
||||
#define IDT_SYSENC_DRIVE_ANALYSIS_INFO 1095
|
||||
#define IDC_SYSENC_NORMAL 1096
|
||||
#define IDC_SYSENC_HIDDEN 1097
|
||||
#define IDC_BOX_HELP_SYSENC_NORMAL 1098
|
||||
#define IDC_HIDDEN_SYSENC_INFO_LINK 1099
|
||||
#define IDT_PASS 1100
|
||||
#define IDC_DEVICE_TRANSFORM_MODE_FORMAT 1101
|
||||
#define IDC_DEVICE_TRANSFORM_MODE_INPLACE 1102
|
||||
#define IDC_DRIVE_LETTER_LIST 1103
|
||||
#define IDT_DRIVE_LETTER 1104
|
||||
#define IDC_LINK_PIM_INFO 1105
|
||||
#define IDC_SHOW_PIM 1106
|
||||
#define IDC_TB 1107
|
||||
#define IDC_SKIP_RESCUE_VERIFICATION 1108
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NO_MFC 1
|
||||
#define _APS_NEXT_RESOURCE_VALUE 134
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1109
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
|
||||
20466
src/Format/Tcformat.c
20466
src/Format/Tcformat.c
File diff suppressed because it is too large
Load Diff
@@ -1,109 +1,109 @@
|
||||
/*
|
||||
Legal Notice: Some portions of the source code contained in this file were
|
||||
derived from the source code of TrueCrypt 7.1a, which is
|
||||
Copyright (c) 2003-2012 TrueCrypt Developers Association and which is
|
||||
governed by the TrueCrypt License 3.0, also from the source code of
|
||||
Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux
|
||||
and which is governed by the 'License Agreement for Encryption for the Masses'
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 IDRIX
|
||||
and are governed by the Apache License 2.0 the full text of which is
|
||||
contained in the file License.txt included in VeraCrypt binary and source
|
||||
code distribution packages. */
|
||||
|
||||
#include "Common/Common.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define NBR_KEY_BYTES_TO_DISPLAY 16
|
||||
#define KEY_GUI_VIEW_SIZE 64 // Max characters of the key hex dump to display
|
||||
|
||||
enum timer_ids
|
||||
{
|
||||
TIMER_ID_RANDVIEW = 0xff,
|
||||
TIMER_ID_SYSENC_PROGRESS,
|
||||
TIMER_ID_NONSYS_INPLACE_ENC_PROGRESS,
|
||||
TIMER_ID_WIPE_PROGRESS,
|
||||
TIMER_ID_SYSENC_DRIVE_ANALYSIS_PROGRESS,
|
||||
TIMER_ID_KEYB_LAYOUT_GUARD
|
||||
};
|
||||
|
||||
static void localcleanup ( void );
|
||||
static void LoadSettings ( HWND hwndDlg );
|
||||
static void SaveSettings ( HWND hwndDlg );
|
||||
static void EndMainDlg ( HWND hwndDlg );
|
||||
void ComboSelChangeEA ( HWND hwndDlg );
|
||||
static void VerifySizeAndUpdate ( HWND hwndDlg , BOOL bUpdate );
|
||||
static void __cdecl sysEncDriveAnalysisThread (void *hwndDlgArg);
|
||||
static void __cdecl volTransformThreadFunction ( void *hwndDlg );
|
||||
static void LoadPage ( HWND hwndDlg , int nPageNo );
|
||||
__int64 PrintFreeSpace ( HWND hwndTextBox , wchar_t *lpszDrive , PLARGE_INTEGER lDiskFree );
|
||||
void DisplaySizingErrorText ( HWND hwndTextBox );
|
||||
void EnableDisableFileNext ( HWND hComboBox , HWND hMainButton );
|
||||
BOOL QueryFreeSpace ( HWND hwndDlg , HWND hwndTextBox , BOOL display );
|
||||
static BOOL FinalPreTransformPrompts (void);
|
||||
void UpdateLastDialogId (void);
|
||||
void HandleOldAssignedDriveLetter (void);
|
||||
void AddCipher ( HWND hComboBox , char *lpszCipher , int nCipher );
|
||||
BOOL CALLBACK PageDialogProc ( HWND hwndDlg , UINT uMsg , WPARAM wParam , LPARAM lParam );
|
||||
BOOL CALLBACK MainDialogProc ( HWND hwndDlg , UINT uMsg , WPARAM wParam , LPARAM lParam );
|
||||
void ExtractCommandLine ( HWND hwndDlg , wchar_t *lpszCommandLine );
|
||||
void DisplayRandPool (HWND hwndDlg, HWND hPoolDisplay, BOOL bShow);
|
||||
void DisplayPortionsOfKeys (HWND headerKeyHandle, HWND masterKeyHandle, wchar_t *headerKeyStr, wchar_t *masterKeyStr, BOOL hideKeys);
|
||||
int DetermineMaxHiddenVolSize (HWND hwndDlg);
|
||||
BOOL IsSparseFile (HWND hwndDlg);
|
||||
BOOL GetFileVolSize (HWND hwndDlg, unsigned __int64 *size);
|
||||
BOOL SwitchWizardToSysEncMode (void);
|
||||
void SwitchWizardToFileContainerMode (void);
|
||||
static BOOL ResolveUnknownSysEncDirection (void);
|
||||
static BOOL WipeHiddenOSCreationConfig (void);
|
||||
static void AfterWMInitTasks (HWND hwndDlg);
|
||||
static void AfterSysEncProgressWMInitTasks (HWND hwndDlg);
|
||||
static void InitSysEncProgressBar (void);
|
||||
static void InitNonSysInplaceEncProgressBar (void);
|
||||
static void UpdateNonSysInplaceEncProgressBar (void);
|
||||
static BOOL SysEncInEffect (void);
|
||||
static BOOL CreatingHiddenSysVol(void);
|
||||
static void NonSysInplaceEncPause (void);
|
||||
static void NonSysInplaceEncResume (void);
|
||||
void ShowNonSysInPlaceEncUIStatus (void);
|
||||
void UpdateNonSysInPlaceEncControls (void);
|
||||
int MountHiddenVolHost ( HWND hwndDlg, wchar_t *volumePath, int *driveNo, Password *password, int pkcs5_prf, int pim, BOOL bReadOnly );
|
||||
int AnalyzeHiddenVolumeHost (HWND hwndDlg, int *driveNo, __int64 hiddenVolHostSize, int *realClusterSize, __int64 *pnbrFreeClusters);
|
||||
int ScanVolClusterBitmap ( HWND hwndDlg, int *driveNo, __int64 nbrClusters, __int64 *nbrFreeClusters);
|
||||
static void WipeStart (void);
|
||||
static void WipeAbort (void);
|
||||
static void UpdateWipeProgressBar (void);
|
||||
static void InitWipeProgressBar (void);
|
||||
static void UpdateWipeControls (void);
|
||||
static DWORD GetFormatSectorSize ();
|
||||
|
||||
extern BOOL showKeys;
|
||||
extern volatile HWND hMasterKey;
|
||||
extern volatile HWND hHeaderKey;
|
||||
extern volatile BOOL bHiddenVolHost;
|
||||
extern volatile BOOL bHiddenVolDirect;
|
||||
extern BOOL bRemovableHostDevice;
|
||||
extern BOOL bWarnDeviceFormatAdvanced;
|
||||
extern HWND hCurPage;
|
||||
extern HWND hProgressBar;
|
||||
extern volatile BOOL bVolTransformThreadCancel;
|
||||
extern volatile BOOL bInPlaceEncNonSysResumed;
|
||||
extern volatile BOOL bFirstNonSysInPlaceEncResumeDone;
|
||||
extern volatile BOOL bInPlaceEncNonSys;
|
||||
extern volatile BOOL bInPlaceDecNonSys;
|
||||
extern __int64 NonSysInplaceEncBytesDone;
|
||||
extern __int64 NonSysInplaceEncTotalSize;
|
||||
extern int nPbar;
|
||||
extern volatile int WizardMode;
|
||||
extern volatile BOOL bInPlaceEncNonSysResumed;
|
||||
|
||||
extern wchar_t HeaderKeyGUIView [KEY_GUI_VIEW_SIZE];
|
||||
extern wchar_t MasterKeyGUIView [KEY_GUI_VIEW_SIZE];
|
||||
extern volatile int NonSysInplaceEncStatus;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
Legal Notice: Some portions of the source code contained in this file were
|
||||
derived from the source code of TrueCrypt 7.1a, which is
|
||||
Copyright (c) 2003-2012 TrueCrypt Developers Association and which is
|
||||
governed by the TrueCrypt License 3.0, also from the source code of
|
||||
Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux
|
||||
and which is governed by the 'License Agreement for Encryption for the Masses'
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 IDRIX
|
||||
and are governed by the Apache License 2.0 the full text of which is
|
||||
contained in the file License.txt included in VeraCrypt binary and source
|
||||
code distribution packages. */
|
||||
|
||||
#include "Common/Common.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define NBR_KEY_BYTES_TO_DISPLAY 16
|
||||
#define KEY_GUI_VIEW_SIZE 64 // Max characters of the key hex dump to display
|
||||
|
||||
enum timer_ids
|
||||
{
|
||||
TIMER_ID_RANDVIEW = 0xff,
|
||||
TIMER_ID_SYSENC_PROGRESS,
|
||||
TIMER_ID_NONSYS_INPLACE_ENC_PROGRESS,
|
||||
TIMER_ID_WIPE_PROGRESS,
|
||||
TIMER_ID_SYSENC_DRIVE_ANALYSIS_PROGRESS,
|
||||
TIMER_ID_KEYB_LAYOUT_GUARD
|
||||
};
|
||||
|
||||
static void localcleanup ( void );
|
||||
static void LoadSettings ( HWND hwndDlg );
|
||||
static void SaveSettings ( HWND hwndDlg );
|
||||
static void EndMainDlg ( HWND hwndDlg );
|
||||
void ComboSelChangeEA ( HWND hwndDlg );
|
||||
static void VerifySizeAndUpdate ( HWND hwndDlg , BOOL bUpdate );
|
||||
static void __cdecl sysEncDriveAnalysisThread (void *hwndDlgArg);
|
||||
static void __cdecl volTransformThreadFunction ( void *hwndDlg );
|
||||
static void LoadPage ( HWND hwndDlg , int nPageNo );
|
||||
__int64 PrintFreeSpace ( HWND hwndTextBox , wchar_t *lpszDrive , PLARGE_INTEGER lDiskFree );
|
||||
void DisplaySizingErrorText ( HWND hwndTextBox );
|
||||
void EnableDisableFileNext ( HWND hComboBox , HWND hMainButton );
|
||||
BOOL QueryFreeSpace ( HWND hwndDlg , HWND hwndTextBox , BOOL display );
|
||||
static BOOL FinalPreTransformPrompts (void);
|
||||
void UpdateLastDialogId (void);
|
||||
void HandleOldAssignedDriveLetter (void);
|
||||
void AddCipher ( HWND hComboBox , char *lpszCipher , int nCipher );
|
||||
BOOL CALLBACK PageDialogProc ( HWND hwndDlg , UINT uMsg , WPARAM wParam , LPARAM lParam );
|
||||
BOOL CALLBACK MainDialogProc ( HWND hwndDlg , UINT uMsg , WPARAM wParam , LPARAM lParam );
|
||||
void ExtractCommandLine ( HWND hwndDlg , wchar_t *lpszCommandLine );
|
||||
void DisplayRandPool (HWND hwndDlg, HWND hPoolDisplay, BOOL bShow);
|
||||
void DisplayPortionsOfKeys (HWND headerKeyHandle, HWND masterKeyHandle, wchar_t *headerKeyStr, wchar_t *masterKeyStr, BOOL hideKeys);
|
||||
int DetermineMaxHiddenVolSize (HWND hwndDlg);
|
||||
BOOL IsSparseFile (HWND hwndDlg);
|
||||
BOOL GetFileVolSize (HWND hwndDlg, unsigned __int64 *size);
|
||||
BOOL SwitchWizardToSysEncMode (void);
|
||||
void SwitchWizardToFileContainerMode (void);
|
||||
static BOOL ResolveUnknownSysEncDirection (void);
|
||||
static BOOL WipeHiddenOSCreationConfig (void);
|
||||
static void AfterWMInitTasks (HWND hwndDlg);
|
||||
static void AfterSysEncProgressWMInitTasks (HWND hwndDlg);
|
||||
static void InitSysEncProgressBar (void);
|
||||
static void InitNonSysInplaceEncProgressBar (void);
|
||||
static void UpdateNonSysInplaceEncProgressBar (void);
|
||||
static BOOL SysEncInEffect (void);
|
||||
static BOOL CreatingHiddenSysVol(void);
|
||||
static void NonSysInplaceEncPause (void);
|
||||
static void NonSysInplaceEncResume (void);
|
||||
void ShowNonSysInPlaceEncUIStatus (void);
|
||||
void UpdateNonSysInPlaceEncControls (void);
|
||||
int MountHiddenVolHost ( HWND hwndDlg, wchar_t *volumePath, int *driveNo, Password *password, int pkcs5_prf, int pim, BOOL bReadOnly );
|
||||
int AnalyzeHiddenVolumeHost (HWND hwndDlg, int *driveNo, __int64 hiddenVolHostSize, int *realClusterSize, __int64 *pnbrFreeClusters);
|
||||
int ScanVolClusterBitmap ( HWND hwndDlg, int *driveNo, __int64 nbrClusters, __int64 *nbrFreeClusters);
|
||||
static void WipeStart (void);
|
||||
static void WipeAbort (void);
|
||||
static void UpdateWipeProgressBar (void);
|
||||
static void InitWipeProgressBar (void);
|
||||
static void UpdateWipeControls (void);
|
||||
static DWORD GetFormatSectorSize ();
|
||||
|
||||
extern BOOL showKeys;
|
||||
extern volatile HWND hMasterKey;
|
||||
extern volatile HWND hHeaderKey;
|
||||
extern volatile BOOL bHiddenVolHost;
|
||||
extern volatile BOOL bHiddenVolDirect;
|
||||
extern BOOL bRemovableHostDevice;
|
||||
extern BOOL bWarnDeviceFormatAdvanced;
|
||||
extern HWND hCurPage;
|
||||
extern HWND hProgressBar;
|
||||
extern volatile BOOL bVolTransformThreadCancel;
|
||||
extern volatile BOOL bInPlaceEncNonSysResumed;
|
||||
extern volatile BOOL bFirstNonSysInPlaceEncResumeDone;
|
||||
extern volatile BOOL bInPlaceEncNonSys;
|
||||
extern volatile BOOL bInPlaceDecNonSys;
|
||||
extern __int64 NonSysInplaceEncBytesDone;
|
||||
extern __int64 NonSysInplaceEncTotalSize;
|
||||
extern int nPbar;
|
||||
extern volatile int WizardMode;
|
||||
extern volatile BOOL bInPlaceEncNonSysResumed;
|
||||
|
||||
extern wchar_t HeaderKeyGUIView [KEY_GUI_VIEW_SIZE];
|
||||
extern wchar_t MasterKeyGUIView [KEY_GUI_VIEW_SIZE];
|
||||
extern volatile int NonSysInplaceEncStatus;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user