VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Dlgcode.c
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/Common/Dlgcode.c
parentaa311a6fad13357772c6e3c85a4bfe393df9382e (diff)
downloadVeraCrypt-d2f2defca9eac0d7f779296bf52f36b161fc6b31.tar.gz
VeraCrypt-d2f2defca9eac0d7f779296bf52f36b161fc6b31.zip
Windows: replace CoInitialize calls with CoInitializeEx
Diffstat (limited to 'src/Common/Dlgcode.c')
-rw-r--r--src/Common/Dlgcode.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c
index 3dd508fa..7282b2ec 100644
--- a/src/Common/Dlgcode.c
+++ b/src/Common/Dlgcode.c
@@ -3487,7 +3487,7 @@ void InitApp (HINSTANCE hInstance, wchar_t *lpszCommandLine)
hInst = hInstance;
SetErrorMode (SetErrorMode (0) | SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX);
- CoInitialize (NULL);
+ CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
#ifndef SETUP
// Application ID
@@ -14351,7 +14351,7 @@ HRESULT GetShellDispatchFromView(IShellView *psv, REFIID riid, void **ppv)
HRESULT ShellExecInExplorerProcess(PCWSTR pszFile)
{
IShellView *psv;
- CoInitialize(NULL);
+ CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
HRESULT hr = GetShellViewForDesktop(IID_PPV_ARGS(&psv));
if (SUCCEEDED(hr))
{
@@ -14526,7 +14526,7 @@ BitLockerEncryptionStatus GetBitLockerEncryptionStatus(WCHAR driveLetter)
wchar_t szDllPath[MAX_PATH] = { 0 };
HMODULE hPropsys = NULL;
- CoInitialize(NULL);
+ CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
if (GetSystemDirectory(szDllPath, MAX_PATH))
StringCchCatW(szDllPath, MAX_PATH, L"\\Propsys.dll");
@@ -15082,7 +15082,7 @@ bool GetKbList (std::vector<std::wstring>& kbList)
kbList.clear();
// Initialize COM.
- hres = CoInitialize(NULL);
+ hres = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
if (FAILED(hres))
{
return false;