Google
 
Web ppczone.net

View Full Version : Browser Helper Object( BHO )


Champa
01-30-2007, 08:42 AM
hi,

I need to retrieve the html content of a particular page by creating a
BHO.
I am able to do this for a desktop application.
But my necessity is Windows Mobile 5.0 Pocket PC.
************************************************** *********************
#include <mshtml.h>

hr = m_spWebBrowser->get_Document(&spDispDoc);

if (SUCCEEDED(hr))
{
CComPtr<IDispatch> spDispDoc;
// ...and query for an HTML document.
//CComQIPtr<IHTMLDocument2> spHTMLDoc = spDispDoc;

CComQIPtr<IHTMLDocument2, &IID_IHTMLDocument2> spHTML;
spHTML = spDispDoc;

if ( spHTML )
{
CComPtr<IHTMLElement> m_pBody;
hr = spHTML->get_body(&m_pBody);

BSTR bstrHTMLText;
hr = m_pBody->get_outerHTML(&bstrHTMLText);

MessageBox( NULL, bstrHTMLText, L"Hello", NULL );
}
************************************************** *********************
******
I have used mshtml.h for using these functiions. But this .h and its
lib is not available in our Windows Mobile Pocket PC 5.0.
How to achieve this ?

*** i tried using the same .h and lib for Pocket PC that is given for
desktop . But i am having issues in it.

Can anyone help me out ?

Thank you,
Champa