Article ID: 271868 - Last Review: May 11, 2006 - Revision: 5.0 BUG: IPersistStreamInit Not Available for a FRAME in a FRAMESETThis article was previously published under Q271868 On This PageSYMPTOMS
In a Microsoft Visual C++ WebBrowser host or similar application, when you call the QueryInterface method for the IPersistStreamInit interface on a FRAME in a FRAMESET, it returns E_NOINTERFACE. When you query for other standard persistence interfaces (IPersistStream, IPersistFile, IPersistMemory), you receive the same error. This problem does not occur in Internet Explorer version 5.01 and earlier. RESOLUTION
There are two ways to work around this problem:
Create a New HTML FileYou can use the IHTMLDocument2::write method to add content to the WebBrowser control. Make sure that you call the IHTMLDocument2::open method first and the IHTMLDocument2::close method last. To obtain the IHTMLDocument2 interface, perform the following steps:
Microsoft recommends that you use version detection in your hosts to switch between solutions, using this workaround to create a new file in Internet Explorer 5.5, and using IPersistStreamInit in earlier versions of the browser. You can obtain the browser's full version number from the following registry value: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Version Read Source for the Current HTML FileTo obtain this original HTML source without IPersistStreamInit, you can use the UrlOpenStream function from the URL Moniker application programming interface (API).STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. MORE INFORMATIONSteps to Reproduce Behavior
REFERENCESFor more information about developing Web-based solutions for Microsoft Internet Explorer, visit the following Microsoft Web sites: http://msdn.microsoft.com/ie/
(http://msdn.microsoft.com/ie/)
http://support.microsoft.com/iep (http://support.microsoft.com/iep) | Article Translations
|

Back to the top
