VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Mount
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2015-07-08 22:08:05 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2015-07-08 22:16:04 +0200
commit7a01453f00aba9ed41228ac9c7064e69379be8cd (patch)
treee23be8dfa2003e5df8dfda615fbbd19af18a613c /src/Mount
parentb809cf62aed2f91ef87c58525053558b29f06ff4 (diff)
downloadVeraCrypt-7a01453f00aba9ed41228ac9c7064e69379be8cd.tar.gz
VeraCrypt-7a01453f00aba9ed41228ac9c7064e69379be8cd.zip
Windows: Fix old issue inherited from TrueCrypt by initializing COM library before instantiating UAC COM object used for changing password. This issue made it impossible to change the password of a volume requiring administrative privileges.
Diffstat (limited to 'src/Mount')
-rw-r--r--src/Mount/MainCom.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Mount/MainCom.cpp b/src/Mount/MainCom.cpp
index b527d428..e6945781 100644
--- a/src/Mount/MainCom.cpp
+++ b/src/Mount/MainCom.cpp
@@ -301,8 +301,10 @@ extern "C" int UacChangePwd (char *lpszVolume, Password *oldPassword, int old_pk
{
CComPtr<ITrueCryptMainCom> tc;
int r;
+ CoInitialize (NULL);
+
if (ComGetInstance (hwndDlg, &tc))
{
WaitCursor ();
CComBSTR volumeBstr;
@@ -319,6 +321,8 @@ extern "C" int UacChangePwd (char *lpszVolume, Password *oldPassword, int old_pk
}
else
r = -1;
+ CoUninitialize ();
+
return r;
}