V
Habe eine Lösung auf CodeGuru gefunden:
CoInitialize(NULL);
string strTemp;
HINSTANCE hInst=::LoadLibrary(_T("OLEACC.DLL"));
if(hInst!=NULL)
{
UINT msg;
CComPtr<IHTMLDocument2> spDoc;
LRESULT lRes;
msg = RegisterWindowMessage(_T("WM_HTML_GETOBJECT"));
SendMessageTimeout(HWND(0x00760FFC), msg, 0L, 0L, SMTO_ABORTIFHUNG, 1000, (DWORD*)&lRes);
LPFNOBJECTFROMLRESULT pfObjectFromLresult=(LPFNOBJECTFROMLRESULT)::GetProcAddress(hInst,LPCSTR("ObjectFromLresult"));
if ( pfObjectFromLresult != NULL )
{
cout << "here " << endl;
HRESULT hr;
hr = (*pfObjectFromLresult)( lRes, IID_IHTMLDocument2, 0, (void**)&spDoc );
if ( SUCCEEDED(hr) )
{
cout << "here " << endl;
BSTR bstr;
//CComPtr<IDispatch> spDisp;
CComPtr<IHTMLElement> pHTMLElement;
hr=spDoc->get_body(&pHTMLElement);
BSTR bstrText;
pHTMLElement->get_innerText(&bstrText);
strTemp=(char *)_bstr_t(bstrText);
cout << strTemp;
}
}
FreeLibrary(hInst);
}
CoUninitialize();
Man braucht mshtml.h, oleacc.h, atlbase.h, tchar.h comutil.h, comsuppwd.lib, oleacc.lib...glaub ich zumindest
http://www.codeguru.com/cpp/i-n/internet/instantmessaging/article.php/c6225/