All right, I've figured it out by myself (or rather, found a tutorial all by myself ) For those interested, here it is: http://www.codeproject.com/atl/#IE+%...rer+plug%2Dins
Now if I just understood what the hesk is going on with all those COM interfaces... Basically, I've got a pointer to an IWebBrowser2, which lets me do all sorts of cool things -- that include, of course, getting the raw HTML. I tried to do it like this:
Code:
IDispatch *pDispatch = NULL;
hr = m_pWebBrowser2->get_Document(&pDispatch);
if (SUCCEEDED(hr))
{
MessageBox(0, "Got IDispatch", 0, 0);
IHTMLDocument2 * pHTMLDocument = NULL;
hr = pDispatch->QueryInterface(IID_IHTMLDocument2, (void **) pHTMLDocument);
pDispatch->Release();
if (SUCCEEDED(hr))
{
MessageBox(0, "Got IHTMLDocument2", 0, 0);
and, of course, Internet Explorer crashed, because the QueryInterface threw an exception (Code 0xc0000005, Flags 0x0, Record 0x0; that's "Access Violation"). And it's COM, it's not supposed to throw exceptions, whatever the circumstances; in the worst case it might return an error code. So, um... would you happen to know what might be the problem?