Can someone help me why AddWebBrowserListener function is not working
properly

Here is my sample code

nsCOMPtr<nsIWebBrowser> pBrowser2;
pBrowser2 =
do_GetService("@mozilla.org/embedding/browser/nsWebBrowser;1");
rv = pBrowser2->AddWebBrowserListener(
NS_GetWeakReference(static_cast<nsIWebProgressListener*>(this)),NS_GET_IID(nsIWebProgressListener));

My component is derived from nsIWebProgressListener and has implemented
all its methods. I have also derived my component from
nsSupportsWeakReference as specified in this link
http://www.mozilla.org/projects/xpcom/weak_references.html.

When I debug this function (AdAddWebBrowserListener) it returns an
invalid result and hence listener class is not working.
I am stuck at this point. 

Thanks in Advance

_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to