InternetSecurityManager cause chtmlview destructor exception

youqiang wu 21 Reputation points
2020-11-23T14:19:14.553+00:00

see the below code:

BOOL CHTMLView::CreateControlSite(COleControlContainer* pContainer,   
	COleControlSite** ppSite, UINT  nID , REFCLSID  clsid )  
{     
	ASSERT(ppSite != NULL);  
	*ppSite = new CCustomControlSite(pContainer);  
	return TRUE;;  
}  

STDMETHODIMP CCustomControlSite::XServiceProvider  
::QueryService(REFGUID guidService,  
	REFIID riid,  
	void** ppvObject)  
{  
  
	if (guidService == SID_SInternetSecurityManager &&  
		riid == IID_IInternetSecurityManager)  
	{  
		METHOD_PROLOGUE(CCustomControlSite, ServiceProvider)  
			HRESULT hr = (HRESULT)pThis->ExternalQueryInterface(&riid, ppvObject);  
		return hr;  
	}  
	else  
	{  
		*ppvObject = NULL;  
  
	}  
	return E_NOINTERFACE;  
}  

open some url and close , it will cause the bellow isssue:

41876-image.png

41961-image.png

How to locate or fix the problem??

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,527 questions
{count} votes