BUG: MFC ActiveX Document Container Hangs During Shutdown on Windows 2000 (272256)
The information in this article applies to:
- The Microsoft Foundation Classes (MFC), when used with:
- the operating system: Microsoft Windows 2000
- Microsoft Excel 2002
This article was previously published under Q272256 SYMPTOMS
A standard MFC ActiveX Document container that embeds a Microsoft Excel 2000 or 2002 spreadsheet or chart hangs during application shutdown, leaving both the MFC application and Excel running in the task list. This occurs only when the application is run on a Microsoft Windows 2000 system. The same application running on a Microsoft Windows NT 4.0, Microsoft Windows 95, or a Microsoft Windows 98 works correctly.
CAUSE
The bug is the result of a change in behavior for OLE embedded objects due to the addition of Component Object Model extension (COM+) to the version of OLE32.DLL that ships with Windows 2000. The bug occurs only under special circumstances, leaving both Excel and MFC with artificially incremented reference counts, which in turn can leave them running because both parties believe that the other is still trying to keep its connection alive.
So far, the problem has only been reproduced with MFC ActiveX Document containers and Excel. This does not mean that other containers, or other ActiveX Document servers, could not be effected.
RESOLUTION
To avoid the problem, OLE containers can forcibly disconnect their proxy/stub during shutdown, thereby allowing their reference count to fall to zero and exit normally. This also frees the running instance of the OLE server once ORPC confirms that the connection is dead (which is after three non-responsive pings spaced about two minutes apart; about six minutes total).
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 12/15/2003 |
---|
Keywords: | kbActiveDocs kbbug kbContainer kbpending KB272256 |
---|
|