Hi All,

In the original code of mfcembed, I have changed this method -

void CMfcEmbedApp::OnNewBrowser()
{
    CBrowserFrame *pBrowserFrame = CreateNewBrowserFrame();

    //Load the HomePage into the browser view
    //if(pBrowserFrame && (GetStartupPageMode() == 1))
        //pBrowserFrame->m_wndBrowserView.LoadHomePage();
        if(pBrowserFrame) {
                
pBrowserFrame->m_wndBrowserView.OpenURL("http://www.google.co.in";);
                //Sleep here for sometime to wait for document to load
                nsCOMPtr<nsIDOMDocument> doc;
                pBrowserFrame->GetBrowserImpl()->GetDOM(doc);
                nsIDOMNode* mEndParent = (nsIDOMNode*)doc;

                nsCOMPtr<nsIDOMNodeList> children;
                nsresult nres = 
mEndParent->GetChildNodes(getter_AddRefs(children));
        }
}

In the last line, the exe crashes stating Access Code Violation.

Please tell what's wrong with this code?

Many thanks,
Vijay

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

Reply via email to