Help and Support
 

powered byLive Search

PRB: Event Firing Changes in MFC May Break Some Containers

Retired KB ArticleThis article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
Article ID:157970
Last Review:October 17, 2003
Revision:2.0
This article was previously published under Q157970

SYMPTOMS

ActiveX Control containers implemented with Borland Delphi (and possibly other containers as well) may not see events fired by ActiveX Controls created with MFC version 4.2. The same container may have been able to handle events fired by a version of the same control created with MFC 4.1 or earlier.

Back to the top

CAUSE

The problem is related to a change made in MFC 4.2's implementation of the IConnectionPoint::Advise method. In MFC 4.1, the framework does a QueryInterface on the passed in IUnknown specifying the GUID of the default event set of the control.

In MFC 4.2, the framework was changed to do a QueryInterface on the passed in IUnknown for IDispatch. Failing that, it queries for the event set interface.

The change made to MFC 4.2 may make some containers unable to handle the events fired by the control. The problem is usually related to the way the container has implemented its control container support.

Back to the top

RESOLUTION

This problem has been addressed with the Visual C++ 4.2 patch. With this patch, MFC's implementation of IConnectionPoint::Advise has been changed back to doing an initial QueryInterface on the passed in IUnknown specifying the GUID of the default event set of the control. Failing that, it queries for IDispatch.

Back to the top

STATUS

This behavior is by design.

Back to the top

REFERENCES

For information on how to obtain the Visual C++ 4.2 patch, please see the following article in the Microsoft Knowledge Base:
156934 (http://support.microsoft.com/kb/156934/EN-US/) PATCH: Visual C++ 4.2b Patch

Back to the top


APPLIES TO
Microsoft Visual C++ 4.2 Enterprise Edition
Microsoft Visual C++ 4.2 Professional Edition

Back to the top

Keywords: 
kb3rdparty kbactivexevents kbcontainer kbctrl kbfix kbprb KB157970

Back to the top

Article Translations

 

Other Support Options

  • Need More Help?
    Contact a Support professional by E-mail, Online or Phone.
  • Customer Service
    For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
  • Newsgroups
    Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.