MarkupServices ParseString Blows Up on Frame Set
Hi All,
I catch an unhandled exception if the following html code is passed
into MarkupServices::ParseString(). I've verified my source code with
other HTML documents with no problems (and the NULL terminator is
present in memory). I also ran the page which contains the frameset
through HTML Tidy to verify it's correctness.
Any ideas?
Jeff
<HTML lang="en">
<HEAD>
<META http-equiv="content-type"
content="text/html;charset=iso-8859-1">
<TITLE>
Frame Enumeration Test
</TITLE>
</HEAD>
<FRAMESET rows="*" cols="*,*">
<FRAME name="leftFrame" src="Left.html">
<FRAMESET rows="*,*">
<FRAME name="mainFrame" src="Main.html">
<FRAME name="bottomFrame" src="Bottom.html">
</FRAMESET>
<NOFRAMES>
<BODY>
</BODY>
</NOFRAMES>
</FRAMESET>
</HTML>
/////////////////////////////////////////////////////
CComPtr<MSHTML::IMarkupServices>pMarkupServices;
hr = pDocument->QueryInterface( IID_IMarkupServices,
reinterpret_cast<PVOID*>( &pMarkupServices ) );
if( FAILED(hr) ) { throw (UINT) __LINE__ - 2; }
/////////////////////////////////////////////////////
CComPtr<MSHTML::IMarkupPointer>pBegin;
hr = pMarkupServices->CreateMarkupPointer( &pBegin );
if( FAILED(hr) ) { throw (UINT) __LINE__ - 1; }
/////////////////////////////////////////////////////
CComPtr<MSHTML::IMarkupPointer>pEnd;
hr = pMarkupServices->CreateMarkupPointer( &pEnd );
if( FAILED(hr) ) { throw (UINT) __LINE__ - 1; }
/////////////////////////////////////////////////////
CComPtr<MSHTML::IMarkupContainer>pContainer;
try {
hr = pMarkupServices->ParseString(
static_cast<wchar_t*>( pWideBuffer ), 0,
&pContainer, pBegin, pEnd );
}
catch( ... )
{
std::cerr << "Fatal Parser Error" << std::endl;
throw (UINT) __LINE__ - 7;
}
if( FAILED(hr) ) { throw (UINT) __LINE__ - 9; }