BUG: Public Friend Properties Break Binary Compatibility (185993)



The information in this article applies to:

  • Microsoft Visual Basic Learning Edition for Windows 5.0
  • Microsoft Visual Basic Learning Edition for Windows 6.0
  • Microsoft Visual Basic Professional Edition for Windows 5.0
  • Microsoft Visual Basic Professional Edition for Windows 6.0
  • Microsoft Visual Basic Enterprise Edition for Windows 5.0
  • Microsoft Visual Basic Enterprise Edition for Windows 6.0

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:
<property name> in the <class name> class module has a procedure ID that differs from a similar declaration in the version-compatible component.
In Visual Basic 6.0:
The <Property Name> member was found in the <Class Name> 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.

REFERENCES

Books Online for Microsoft Visual Basic, version 5.0

Modification Type:MajorLast Reviewed:5/13/2003
Keywords:kbbug kbpending KB185993