FIX: Closing an ActiveX Control Project Crashes DevStudio (157893)
The information in this article applies to:
- The Microsoft Foundation Classes (MFC), when used with:
- Microsoft Visual C++, 32-bit Enterprise Edition 4.2
- Microsoft Visual C++, 32-bit Professional Edition 4.2
This article was previously published under Q157893 SYMPTOMS
When opening or closing a project in Developer Studio, you may see an
access violation with the following error message:
[ASCII 147]MSDEV CAUSED AN INVALID PAGE FAULT IN MODULE
MSVCRES.DLL at 0137:503126ba.[ASCII 148]
This behavior occurs if the Properties window for a ControlWizard-
generated ActiveX Control is invoked in the dialog editor.
CAUSE
This is due to a bug in the MFC 4.2 libraries.
RESOLUTION
To obtain this patch, please refer to the following article in the
Microsoft Knowledge Base:
The problem occurs because IOleObject::SetClientSite(NULL) does not release
its existing pointer to ambient property interface. For example,
COleControl::XOleObject::SetClientSite(NULL) doesn[ASCII 146]t call
pThis->m_ambientDispDriver.ReleaseDispatch();.
The problem was fixed by adding the following line to
COleControl::XOleObject::SetClientSite in the MFC source code:
// Release existing pointer to ambient property dispinterface.
pThis->m_ambientDispDriver.ReleaseDispatch();
if (pClientSite != NULL)
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products
listed at the beginning of this article. This bug was corrected in
Visual C++ 4.2B patch.
Modification Type: | Major | Last Reviewed: | 11/18/2003 |
---|
Keywords: | kbBug kbCtrl kbfix KB157893 |
---|
|