mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-13 11:58:26 -06:00
Windows: replace CoInitialize calls with CoInitializeEx
This commit is contained in:
@@ -255,7 +255,7 @@ extern "C" int UacFormatNtfs (HWND hWnd, int driveNo, int clusterSize)
|
||||
CComPtr<ITrueCryptFormatCom> tc;
|
||||
int r;
|
||||
|
||||
CoInitialize (NULL);
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
|
||||
|
||||
if (ComGetInstance (hWnd, &tc))
|
||||
r = tc->FormatNtfs (driveNo, clusterSize);
|
||||
@@ -272,7 +272,7 @@ extern "C" int UacFormatFs (HWND hWnd, int driveNo, int clusterSize, int fsType)
|
||||
CComPtr<ITrueCryptFormatCom> tc;
|
||||
int r;
|
||||
|
||||
CoInitialize (NULL);
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
|
||||
|
||||
if (ComGetInstance (hWnd, &tc))
|
||||
r = tc->FormatFs (driveNo, clusterSize, fsType);
|
||||
@@ -290,7 +290,7 @@ extern "C" int UacAnalyzeHiddenVolumeHost (HWND hwndDlg, int *driveNo, __int64 h
|
||||
CComPtr<ITrueCryptFormatCom> tc;
|
||||
int r;
|
||||
|
||||
CoInitialize (NULL);
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
|
||||
|
||||
if (ComGetInstance (hwndDlg, &tc))
|
||||
r = tc->AnalyzeHiddenVolumeHost ((__int64) hwndDlg, driveNo, hiddenVolHostSize, realClusterSize, nbrFreeClusters);
|
||||
@@ -307,7 +307,7 @@ extern "C" BOOL UacWriteLocalMachineRegistryDword (HWND hwndDlg, wchar_t *keyPat
|
||||
CComPtr<ITrueCryptFormatCom> tc;
|
||||
int r = 0;
|
||||
|
||||
CoInitialize (NULL);
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
|
||||
|
||||
if (ComGetInstance (hwndDlg, &tc))
|
||||
{
|
||||
@@ -345,7 +345,7 @@ extern "C" DWORD UacFastFileCreation (HWND hWnd, wchar_t* filePath, __int64 file
|
||||
CComPtr<ITrueCryptFormatCom> tc;
|
||||
DWORD r;
|
||||
|
||||
CoInitialize (NULL);
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
|
||||
|
||||
if (ComGetInstance (hWnd, &tc))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user