MCPcopy Create free account
hub / github.com/clechasseur/pathcopycopy / UnregisterPlugin2

Method UnregisterPlugin2

PathCopyCopy/src/PathCopyCopyContextMenuExt.cpp:191–206  ·  view source on GitHub ↗

IPathCopyCopyContextMenuExt2::UnregisterPlugin2 Removes a plugin component from the Path Copy Copy registry. This version allows the user to unregister per-user and per-machine components. @param p_pCLSID ID of plugin COM class, as a string. @param p_User Whether the plugin was registered per-user (VARIANT_TRUE) or per-machine (VARIANT_FALSE). @return S_OK if successful, S_FALSE if the component

Source from the content-addressed store, hash-verified

189// @return S_OK if successful, S_FALSE if the component was not registered, otherwise an error code.
190//
191[[gsl::suppress(c.128)]]
192STDMETHODIMP CPathCopyCopyContextMenuExt::UnregisterPlugin2(
193 REFCLSID p_CLSID,
194 VARIANT_BOOL p_User)
195{
196 HRESULT hRes = E_FAIL;
197 try {
198 // Use a local settings object here so that we don't check for updates if only this is called.
199 hRes = PCC::Settings().UnregisterCOMPlugin(p_CLSID, p_User != VARIANT_FALSE) ? S_OK : S_FALSE;
200 } catch (const PCC::SettingsException& se) {
201 hRes = HRESULT_FROM_WIN32(se.ErrorCode());
202 } catch (...) {
203 hRes = E_UNEXPECTED;
204 }
205 return hRes;
206}
207
208#endif // PCC_NO_CONTEXT_MENU_EXT2
209

Callers 1

DllUnregisterServerMethod · 0.80

Calls 3

UnregisterCOMPluginMethod · 0.80
ErrorCodeMethod · 0.80
SettingsClass · 0.50

Tested by

no test coverage detected