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,

michael

_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-dev

Reply via email to