DISPID_SETSECURELOCKICON event not firing
-
I am writing a tool band object using C++ and Visual Studio.NET 2003. The toolband object is a regular ATL/C++ dll inproc server project. Environment: Windows XP Professional SP 1, Visual Studio.NET 2003 installed, IE 6.0 SP1 (all the Windows update patches applied for everything) The object (CToolBand) is derived from the classes CComObjectRootEx, CComCoClass, IObjectWitSiteImpl, IDispatchImpl, IInputObject and IDeskBand. The SetSite method is implemented as follows (excerpts with error handling stripped out):
STDMETHODIMP CToolBand::SetSite(IUnknown *punkSite)
{
// punkSite != 0
m_spSite = pUnkSite; // CComPtr m_spSite is a member of CToolBand// 1. get IOleWindow, call GetWindow and attach the (rebar) HWND to an internal window class .... // 2. get the top level web browser (here it comes...) CComPtr spService; m\_spSite->QueryService(IID\_IServiceProvider, (void \*\*)&spService); CComPtr spService2; spService->QueryService(SID\_STopLevelBrowser, IID\_IServiceProvider, (void \*\*)&spService2); spService2->QueryService(SID\_SWebBrowserApp, IID\_IWebBrowser2, (void \*\*)&m\_spWebBrowser2); // m\_spWebBrowser2 is member in CToolBand and declared as CComPtr // 3. request advise for DWebBrowserEvents2 events CComQIPtr spCPC = m\_spWebBrowser2; CComPtr spCP; spCPC->FindConnectionPoint(DIID\_DWebBrowserEvents2, &spCP); spCP->Advise(GetUnknown(), &m\_dwCookie); // 4. get IInputObjectSite // 5. create tool band toolbar window // done
}
The Invoke is also implemented as:
STDMETHODIMP CToolBand::Invoke(...)
{
if(dispid == DISPID_BEFORENAVIGATE2)
{
ATLTRACE(_T("BeforeNavigate2"));
}
// .. other if cases for various DISPIDsreturn E_NOTIMPL;
}What I cannot understand is that I receive BeforeNavigate2, NavigateComplete, DocumentComplete, Quit, PrivacyImpactedStateChange events (and also the TitleChange, Progress, StatusTextChange, PropertyChange etc.). But I DO NOT receive the SetSecureLockIcon (DISPID_SETSECURELOCKICON) at all, although I am sure that I tested with a SSL 128bit site. In my header file this DISPID have the value 269 (ExDispID.h) In fact, I made a sample VB application with a form hosting a web browser control, and I received the setSecureLockIcon event, so I don't think is something f