IPathCopyCopyContextMenuExt::UnregisterPlugin Removes a plugin component from the Path Copy Copy registry. @param p_pCLSID ID of plugin COM class, as a string. @return S_OK if successful, S_FALSE if the component was not registered, otherwise an error code.
| 133 | // @return S_OK if successful, S_FALSE if the component was not registered, otherwise an error code. |
| 134 | // |
| 135 | [[gsl::suppress(c.128)]] |
| 136 | STDMETHODIMP CPathCopyCopyContextMenuExt::UnregisterPlugin( |
| 137 | REFCLSID p_CLSID) |
| 138 | { |
| 139 | HRESULT hRes = E_FAIL; |
| 140 | try { |
| 141 | // Use a local settings object here so that we don't check for updates if only this is called. |
| 142 | hRes = PCC::Settings().UnregisterCOMPlugin(p_CLSID, false) ? S_OK : S_FALSE; |
| 143 | } catch (const PCC::SettingsException& se) { |
| 144 | hRes = HRESULT_FROM_WIN32(se.ErrorCode()); |
| 145 | } catch (...) { |
| 146 | hRes = E_UNEXPECTED; |
| 147 | } |
| 148 | return hRes; |
| 149 | } |
| 150 | |
| 151 | #ifndef PCC_NO_CONTEXT_MENU_EXT2 |
| 152 |
no test coverage detected