FIX: Assertion with an Insertable OLE Control (177641)
The information in this article applies to:
This article was previously published under Q177641 SYMPTOMS
If you try to handle a WM_LBUTTONDOWN message to get access to the
IOleContainer interface for an insertable OLE Control, the following
Assertion Error occurs:
Debug Assertion Failed!
Program: ...
File: wincore.cpp
Line: 871
CAUSE
This problem is cause by COleClientItem::XOleClientSite::GetContainer not
pushing the container's module state. As a result, the container attempts
to assert that the container's view window is present in the control
module's HWND map.
RESOLUTION
To correct this problem, include the following in the call to
COleClientItem::XOleClientSite::GetContainer function:
STDMETHODIMP COleClientItem::XOleClientSite::GetContainer
(LPOLECONTAINER **ppContainer)
{
#ifdef _DEBUG
METHOD_PROLOGUE_EX(COleClientItem, OleClientSite)
#else
METHOD_PROLOGUE_EX_(COleClientItem, OleClientSite)
#endif
}
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++, 32-
bit Edition version 4.1.
Modification Type: | Major | Last Reviewed: | 5/5/2001 |
---|
Keywords: | kbbug kbNoUpdate kbVC410fix KB177641 |
---|
|