CoCreateInstance() on Internet Explorer is unsuccessful after multiple calls (323568)
The information in this article applies to:
- Microsoft Internet Explorer 6.0
- Microsoft Internet Explorer 5.5
This article was previously published under Q323568 SYMPTOMS
If you try to call CoCreateInstance() with a CLSID of CLSID_InternetExplorer multiple times, you eventually see CoCreateInstance() return seemingly random failure HRESULTs, including E_NOINTERFACE and E_CLASS_NOT_REG. You may also see strange windowing behavior through the operating system; for example, the All Programs window on the Start menu does not open when you select it.
This problem is most relevant to applications that automate Internet Explorer and that require multiple instances of the browser to run at one time, such as load-testing applications.
CAUSEMicrosoft
Windows maintains a kernel structure that is known as the desktop heap. Every new instance of a Windows executable (.exe) file has a window station and a desktop structure that is allocated for the instance out of this heap. By default, the total heap that is available for interactive applications is about three megabytes (MB). This limits the number of running instances of Internet Explorer to between 60 and 70.
Note Interactive applications are applications that have a message pump and that accept user input.RESOLUTION
For more information about how to increase the memory that is available for the interactive desktop heap, click the following article number to view the article in the Microsoft Knowledge Base:
126962
"Out of Memory" error message appears when you have a large number of programs running
On Microsoft Windows 2000 and Microsoft Windows XP, the SharedSection variable that is discussed in this article has an array of three numbers; you must change the second number, which is the interactive desktop heap. However, keep in mind that increasing this value may result in serious performance degradation on your computer.
STATUSThis behavior is by design.REFERENCESFor more information about developing Web-based solutions for Microsoft Internet Explorer, visit the following Microsoft Web sites:
Modification Type: | Major | Last Reviewed: | 5/15/2006 |
---|
Keywords: | kbprb KB323568 |
---|
|