BUG: Office XP Version of Mscal.ocx Breaks Binary Compatibility For Early Bound Clients (311219)
The information in this article applies to:
- Microsoft Office XP Developer
- Microsoft Access 2002
This article was previously published under Q311219 SYMPTOMS
Clients that use early binding to the Microsoft Calendar control (Mscal.ocx) may encounter unexpected errors or invalid data or may crash because of stack corruption when the properties or methods of the control's ICalendar interface are called. The problem occurs on computers that have recently had Office XP installed.
CAUSE
Version 10.0 of the Calendar control, which ships with Office XP, contains added methods to support assigning Font objects by reference ( putref) for the following properties:
Because of this change, methods are added to the middle of the interface, thereby breaking binary compatibility by changing the layout of the ICalendar v-table. Consequently, any client that is built by using early binding to the 8.0 (Office 97) or 8.1 (Office 2000) version of Mscal.ocx may call the wrong v-table methods on the 10.0 version.
RESOLUTION
All clients that use Mscal.ocx should use late (DISPID) binding to call methods on the ICalendar interface.
Microsoft Visual Basic (VB), Visual Basic for Applications (VBA), and MFC control containers are not normally affected by this problem because they use late (DISPID) binding by default. Active Template Library (ATL) control containers that use #import are more likely to encounter the problem, and can use CComDispatchDriver to wrap the control to make late-bound calls.
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/12/2003 |
---|
Keywords: | kbAutomation kbbug kbpending KB311219 |
---|
|