1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 11:08:02 -06:00

Windows: replace CoInitialize calls with CoInitializeEx

This commit is contained in:
Mounir IDRASSI
2023-09-11 00:03:28 +02:00
parent aa311a6fad
commit d2f2defca9
6 changed files with 15 additions and 15 deletions

View File

@@ -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))
{

View File

@@ -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