In my MFC application i have a derived CDHtmlDialog class that opens a login screen and i need to get a url and a cookie from the server after a redirect.
I navigate to the url inside the OnInitDialog and catch the redirect inside OnNavigateComplete:
void CDMYHtmlDlg::OnNavigateComplete(LPDISPATCH pDisp, LPCTSTR szUrl)
{
BSTR *bstr = nullptr;
this->GetDHtmlDocument(&this->m_spHtmlDoc);
if (this->m_spHtmlDoc != nullptr)
this->m_spHtmlDoc->get_cookie(bstr);
}
but the GetDHtmlDocument is returning E_NOINTERFACE, should i implement him? if yes how do i get the IHTMLDocument2?.
So my question is why i can't get the document and is this the right way to get a cookie?
Thank's in advance and sorry for my bad English.