URL https :".." when used then unable to get content of page

57 Views Asked by At

i used mfc active x control and navigate the url. as url is https:"..." so i am unable to get the content of page.

following is the code i used.

m_cstrURL = L"https:\\......" like that

m_webBrowser.Navigate(m_cstrURL.operator LPCWSTR(), NULL, NULL, NULL, NULL);    

IHTMLDocument2 *document = (IHTMLDocument2 *)m_webBrowser.get_Document() ; 

    HRESULT hresult = document->get_body(&iSource);

    if(iSource)
    {
        iSource->get_innerText(&btsrSource); 
        strSource=btsrSource.m_str; 
    }

so if url contains the https: my get_body failed. i mean isource is null..

1

There are 1 best solutions below

0
On

Yes Gabor, by mistake that was written. Anyways thank you,for attending my question. i just found the solution for that. i was using wrong event handler as, NavigateComplete2 instead i used DocumentComplete. it is working....