/** * Return the path of the file containing the public key. * * The path is set via SetKeyPaths(). */ HRESULT OnPublicKeyFileRequest(BSTR *pbstrPublicKeyFile) { ATLENSURE_RETURN_HR(pbstrPublicKeyFile, E_POINTER); *pbstrPublicKeyFile = NULL; try { *pbstrPublicKeyFile = comet::bstr_t::detach( m_publicKey.file_string()); } WINAPI_COM_CATCH_AUTO_INTERFACE(); return S_OK; }
/** * Return command's title string. * * @param[in] psiItemArray Optional array of PIDLs that command would be * executed upon. * @param[out] ppszName Location in which to return character buffer * allocated with CoTaskMemAlloc. */ virtual IFACEMETHODIMP get_Name( IShellItemArray* psiItemArray, wchar_t** ppszName) { if (ppszName) *ppszName = NULL; else return E_POINTER; try { HRESULT hr = ::SHStrDup(title(psiItemArray).c_str(), ppszName); if (FAILED(hr)) BOOST_THROW_EXCEPTION(comet::com_error(hr)); } WINAPI_COM_CATCH_AUTO_INTERFACE(); return S_OK; }