Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. DISPID_SETSECURELOCKICON event not firing

DISPID_SETSECURELOCKICON event not firing

Scheduled Pinned Locked Moved Web Development
csharpc++sharepointvisual-studiosysadmin
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    zero sg
    wrote on last edited by
    #1

    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 DISPIDs

    return 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

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups