Microsoft KB Archive/253668

= PRB: Events Not Working for COM Objects in HTML Page =

Article ID: 253668

Article Last Modified on 5/12/2003

-

APPLIES TO


 * Microsoft Internet Explorer 5.0
 * Microsoft Internet Explorer 5.01
 * Microsoft Internet Explorer 5.5

-



This article was previously published under Q253668



SUMMARY
When using the OBJECT tag to add a COM object to a Web page, the event handlers may not work correctly. In some extreme cases, the object may intermittently fail to create.



CAUSE
The syntax for the CLASSID attribute is specified incorrectly.



RESOLUTION
To resolve this problem, correct the CLASSID attribute syntax. Specifically, insure that the OBJECT tag has the form:  Note that there are no parentheses surrounding the control CLSID.



MORE INFORMATION
When an incorrect syntax for the CLSID is specified using parentheses around the CLSID, the object may still be created, though in an unsupported fashion. When this happens, the HTML engine is unable to obtain enough information to connect events from simple objects, such as those created with the ATL Object Wizard as "ATL simple objects."

Adding support for IPersist and IProvideClassInfo2 to the simple COM object will alleviate the event handling problems, but the correct solution is to correct the bad CLASSID syntax in the HTML page. There is no guarantee that this illegal syntax will work at all in future versions of Internet Explorer.



STATUS
This behavior is by design.

Keywords: kbprb KB253668

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.