static char szHTMLText[] = "<html><h1>Stream Test</h1><p>This HTML content is being\
loaded from a stream.</html>";
// Is this the DocumentComplete event for the top frame window?
// Check COM identity: compare IUnknown interface pointers.
hr = m_wndBrowser.GetApplication()->QueryInterface( IID_IUnknown, (void**)&pUnkBrowser );
if ( SUCCEEDED(hr) )
{
hHTMLText = GlobalAlloc( GPTR, lstrlen(szHTMLText)+1 );
if ( hHTMLText )
{
lstrcpy( (char*)hHTMLText, szHTMLText );
hr = CreateStreamOnHGlobal( hHTMLText, TRUE, &pStream );
if ( SUCCEEDED(hr) )
{
// Call the helper function to load the WebOC from the stream.
LoadWebOCFromStream( m_wndBrowser.GetDocument(), pStream );
pStream->Release();
}
//GlobalFree( hHTMLText );
}