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

Method UnregisterPlugin

PathCopyCopy/src/PathCopyCopyContextMenuExt.cpp:135–149  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

133// @return S_OK if successful, S_FALSE if the component was not registered, otherwise an error code.
134//
135[[gsl::suppress(c.128)]]
136STDMETHODIMP 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

Callers 3

DllUnregisterServerMethod · 0.80
DllUnregisterServerMethod · 0.80

Calls 3

UnregisterCOMPluginMethod · 0.80
ErrorCodeMethod · 0.80
SettingsClass · 0.50

Tested by

no test coverage detected