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

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.

This commit is contained in:
Mounir IDRASSI
2015-07-08 22:08:05 +02:00
parent b809cf62ae
commit 7a01453f00

View File

@@ -302,6 +302,8 @@ extern "C" int UacChangePwd (char *lpszVolume, Password *oldPassword, int old_pk
CComPtr<ITrueCryptMainCom> tc;
int r;
CoInitialize (NULL);
if (ComGetInstance (hwndDlg, &tc))
{
WaitCursor ();
@@ -320,5 +322,7 @@ extern "C" int UacChangePwd (char *lpszVolume, Password *oldPassword, int old_pk
else
r = -1;
CoUninitialize ();
return r;
}