diff options
author | Igor Pavlov <ipavlov@users.sourceforge.net> | 2009-06-02 04:00:00 +0400 |
---|---|---|
committer | Kornel LesiĆski <kornel@geekhood.net> | 2016-05-28 02:15:59 +0300 |
commit | 829409452d85cd6dd9dfc9151f109d6e13a2bb1c (patch) | |
tree | e0acaea47044d167f35fa197584dee1bde41c329 /CPP/7zip/UI/Agent/UpdateCallbackAgent.cpp | |
parent | 8874e4fbc9faabdcff719b9b2ac8ebad4f282bbe (diff) |
9.04 beta
Diffstat (limited to 'CPP/7zip/UI/Agent/UpdateCallbackAgent.cpp')
-rwxr-xr-x | CPP/7zip/UI/Agent/UpdateCallbackAgent.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
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<ICryptoGetTextPassword> getTextPassword; + Callback.QueryInterface(IID_ICryptoGetTextPassword, &getTextPassword); + if (!getTextPassword) + return E_NOTIMPL; + return getTextPassword->CryptoGetTextPassword(password); +} + /* HRESULT CUpdateCallbackAgent::ShowDeleteFile(const wchar_t *name) { |