Microsoft KB Archive/190492

= BUG: New Implements Does Not Generate Incompatibility Error =

Article ID: 190492

Article Last Modified on 5/13/2003

-

APPLIES TO


 * Microsoft Visual Basic 6.0 Learning Edition
 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition

-



This article was previously published under Q190492



SYMPTOMS
If you remove a Public data member and add an Implements statement with the same class name as the removed Public data member and with Binary Compatibility set, Visual Basic does not generate a compatibility error as expected.

Existing client applications using the data member may generate a fatal error (GPF) with the new compatible server.



RESOLUTION
If you comment out Public data members, ensure you are not using the same identifier name in an Implements statement.



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.



Steps to Reproduce Behavior
 Create a new ActiveX DLL project in Visual Basic. Class1 will be created by default. Set the Instancing Property of Class1 to 2-PublicNotCreateable. Add a Class to the project by selecting Add Class Module from the Project menu.  Add the following code to Class1: Public Class2 As Class2   Add the following code to Class2: Public Class1 As Class1  From the File Menu, click on Make Project1 to compile the Project and make Project1.dll</li> From the Project Menu, select Project1 Properties.</li> Select the Component tab, check the Binary Compatibility Radio Button, and then click OK to set Binary Compatibility.</li>  Comment out the data member in Class2 as shown below: ' Public Class1 As Class1 </li>  In Class2, paste the following code: Implements Class1 Private Property Set Class1_Class2(ByVal RHS As Class2)

End Property

Private Property Get Class1_Class2 As Class2

End Property </li> Recompile the project, and make the Project1.Dll. Note that the ActiveX DLL compiles as expected. However, a compatibility error should have been raised.</li></ol>

Additional query words: kbdss kbDSupport kbVBp kbVBp600bug kbCompiler

Keywords: kbbug KB190492

-

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

© Microsoft Corporation. All rights reserved.