Microsoft KB Archive/190085

= BUG: No Binary Compatibility Error With Null GUIDs Enums =

Article ID: 190085

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 Q190085



SYMPTOMS
If you use Enums from some Microsoft libraries as parameters and then change the Enum to a different one with the project set to Binary Compatibility, an incompatibility error is not generated as expected.



CAUSE
Most Microsoft libraries and all Visual Basic generated DLLs contain Enums that have GUIDs. However, the libraries listed in the MORE INFORMATION section below have Enums with NULL GUIDs.

If a library has NULL GUIDs for the Enums, it is possible to change parameters of methods to different Enums and still not get an incompatibility error, even though Binary Compatibility is set.



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
The following libraries have NULL GUIDs for Enums, and will therefore exhibit this problem when used as a parameter:

Microsoft DAO 2.5/3.51 Compatibility Library

Microsoft DAO 3.51 Object Library

Microsoft Data Environment Extensibility Objects 1.0

Microsoft Dialog Automation Objects

Microsoft OLE DB Service Component 1.0 Type Library

Microsoft OLE DB Simple Provider 1.5 Library

Microsoft Remote Data Services 2.0 Library

Microsoft Scripting Runtime

Microsoft Transaction Server Type Library

Microsoft WebClass Library v1.0

Steps to Reproduce Behavior
 Create a new ActiveX DLL project in Visual Basic. Class1 is created by default. Add a Reference to one of the libraries listed above by selecting References from the Project menu.  Paste the following code into Class1: Public Sub Test(a As <>) End Sub  Compile as Project1.dll. Set Binary Compatibility to Project1.dll by selecting Project Properties from the Project menu, then selecting the Components tab. Check Binary Compatibility and select the Project1.dll.</li>  Modify the code in Class1 to be: Public Sub Test(a As <<choose a different Enum from the library chosen   in Step 2>>) End Sub </li> Compile Project2.dll. Note that the DLL compiles without any incompatibility error.</li></ol>

Additional query words: kbDSupport kbVBp600bug kbCompiler kbdss kbVBp

Keywords: kbbug KB190085

-

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

© Microsoft Corporation. All rights reserved.