Microsoft KB Archive/185993

= BUG: Public Friend Properties Break Binary Compatibility =

Article ID: 185993

Article Last Modified on 5/13/2003

-

APPLIES TO


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

-



This article was previously published under Q185993



SYMPTOMS
When compiling an ActiveX DLL or ActiveX EXE using Binary Compatibility, the following error message might occur:

In Visual Basic 5.0:

in the class module has a procedure ID that differs from a similar declaration in the version-compatible component.

In Visual Basic 6.0:

The  member was found in the  class module of the version-compatible component, but not in the current project.

This problem occurs even if you have not modified any interface within the ActiveX Server.



CAUSE
When descriptions are added to a Let property declared as Friend and having a corresponding Public Get property, the above error message might occur during compilation.



RESOLUTION
Open the code window for that class module. Then from the Tools menu, select Procedure Attributes. Then find the property name in the Name drop-down list box and delete any text in the description box.



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.



MORE INFORMATION
Using the Visual Basic Class Builder Utility Add-In, you have the option of adding "Descriptions" to properties of the ActiveX Server object that is being developed. These descriptions are useful in tools such as the Object Browser, when other programmers are using the ActiveX Servers in their projects.

After the Visual Basic Class Builder Utility builds the class, it is common to modify the function stubs generated to suit the purpose of the class. When descriptions are added to a Let property declared as "Friend" and having a corresponding "Public" Get property, the above error message might occur during compilation.

