Before I attempt to read about COM communication with IE, is there a reason you can't get the webpage instead? Must it involve an active user session? (Assuming java alters the div or something)
It seems more simplistic to open a socket and perform a GET request yourself.
Additionally, I see a lot of redundant patterns in the above code.
Is it unreasonable to create a basic wrapper class for those patterns?
Edit: Example
bool success( (ISuperParent*)COM_ptr, (void*)hRes )
{
if( !SUCCEEDED(hRes) || !COM_ptr )
{
COM_ptr->Release(); // (ISuperParent*) must contain this prototype
_Error(8);
_hResError(hRes);
return false;
}
return true;
}
This pattern occurs like 5 or 10 times...