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:
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user