VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Mount
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2023-09-11 00:03:28 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2023-09-11 00:03:28 +0200
commitd2f2defca9eac0d7f779296bf52f36b161fc6b31 (patch)
tree37146ca9339171563af3916e5d571c55e8812f42 /src/Mount
parentaa311a6fad13357772c6e3c85a4bfe393df9382e (diff)
downloadVeraCrypt-d2f2defca9eac0d7f779296bf52f36b161fc6b31.tar.gz
VeraCrypt-d2f2defca9eac0d7f779296bf52f36b161fc6b31.zip
Windows: replace CoInitialize calls with CoInitializeEx
Diffstat (limited to 'src/Mount')
-rw-r--r--src/Mount/MainCom.cpp6
-rw-r--r--src/Mount/Mount.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/Mount/MainCom.cpp b/src/Mount/MainCom.cpp
index aa628f57..ce6803ac 100644
--- a/src/Mount/MainCom.cpp
+++ b/src/Mount/MainCom.cpp
@@ -275,7 +275,7 @@ extern "C" int UacBackupVolumeHeader (HWND hwndDlg, BOOL bRequireConfirmation, w
CComPtr<ITrueCryptMainCom> tc;
int r;
- CoInitialize (NULL);
+ CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
if (ComGetInstance (hwndDlg, &tc))
{
@@ -303,7 +303,7 @@ extern "C" int UacRestoreVolumeHeader (HWND hwndDlg, wchar_t *lpszVolume)
CComPtr<ITrueCryptMainCom> tc;
int r;
- CoInitialize (NULL);
+ CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
if (ComGetInstance (hwndDlg, &tc))
{
@@ -331,7 +331,7 @@ extern "C" int UacChangePwd (wchar_t *lpszVolume, Password *oldPassword, int old
CComPtr<ITrueCryptMainCom> tc;
int r;
- CoInitialize (NULL);
+ CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
if (ComGetInstance (hwndDlg, &tc))
{
diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c
index e41d9a08..f5c22a9e 100644
--- a/src/Mount/Mount.c
+++ b/src/Mount/Mount.c
@@ -295,7 +295,7 @@ static std::vector<MSXML2::IXMLDOMNodePtr> GetReadChildNodes (MSXML2::IXMLDOMNod
static bool validateDcsPropXml(const char* xmlData)
{
bool bValid = false;
- HRESULT hr = CoInitialize(NULL);
+ HRESULT hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
if(FAILED(hr))
return false;
else