[webkit-dev] Implementing an decidePolicyForNavigationAction under Windows

Michael Seydl michael.seydl at gmail.com
Wed Oct 31 07:09:29 PDT 2007

Hi guys!

I'm trying to impement a way to catch when a link was clicked therefore 
i wrote this piece of code, which keeps crashing on me. It's pretty 
obvious why its crashing, so this point is covered.

I think it's clear what i want to do here, but how do i do it right?

Here the chunk of code i've written sofar:

HRESULT STDMETHODCALLTYPE PolicyDelegate::decidePolicyForNavigationAction(
    /* [in] */ IWebView *webView,
    /* [in] */ IPropertyBag *actionInformation,
    /* [in] */ IWebURLRequest *request,
    /* [in] */ IWebFrame *frame,
    /* [in] */ IWebPolicyDecisionListener *listener)
    VARIANT variant;

    if(SUCCEEDED(actionInformation->Read(WebActionElementKey, element, 0)))
        IPropertyBag *bag = (IPropertyBag*) element;

        VARIANT domElement;

        bag->Read(WebElementDOMNodeKey, &domElement, 0);

    return E_NOTIMPL;

I'd be thankful for any suggestions and tips.

Thanks and Best Regards,


More information about the webkit-dev mailing list