From 829409452d85cd6dd9dfc9151f109d6e13a2bb1c Mon Sep 17 00:00:00 2001 From: Igor Pavlov Date: Tue, 2 Jun 2009 00:00:00 +0000 Subject: 9.04 beta --- CPP/7zip/UI/Agent/UpdateCallbackAgent.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'CPP/7zip/UI/Agent/UpdateCallbackAgent.cpp') diff --git a/CPP/7zip/UI/Agent/UpdateCallbackAgent.cpp b/CPP/7zip/UI/Agent/UpdateCallbackAgent.cpp index e14197d2..21549c90 100755 --- a/CPP/7zip/UI/Agent/UpdateCallbackAgent.cpp +++ b/CPP/7zip/UI/Agent/UpdateCallbackAgent.cpp @@ -90,19 +90,29 @@ HRESULT CUpdateCallbackAgent::SetOperationResult(Int32 operationResult) HRESULT CUpdateCallbackAgent::CryptoGetTextPassword2(Int32 *passwordIsDefined, BSTR *password) { + *password = NULL; *passwordIsDefined = BoolToInt(false); if (!_cryptoGetTextPassword) { if (!Callback) return S_OK; - HRESULT result = Callback.QueryInterface( - IID_ICryptoGetTextPassword2, &_cryptoGetTextPassword); - if (result != S_OK) + Callback.QueryInterface(IID_ICryptoGetTextPassword2, &_cryptoGetTextPassword); + if (!_cryptoGetTextPassword) return S_OK; } return _cryptoGetTextPassword->CryptoGetTextPassword2(passwordIsDefined, password); } +HRESULT CUpdateCallbackAgent::CryptoGetTextPassword(BSTR *password) +{ + *password = NULL; + CMyComPtr getTextPassword; + Callback.QueryInterface(IID_ICryptoGetTextPassword, &getTextPassword); + if (!getTextPassword) + return E_NOTIMPL; + return getTextPassword->CryptoGetTextPassword(password); +} + /* HRESULT CUpdateCallbackAgent::ShowDeleteFile(const wchar_t *name) { -- cgit v1.2.3