FIX: Invalid Enum Value Causes Incompatible Binary CompatibleLast reviewed: December 18, 1997Article ID: Q171819 |
The information in this article applies to:
SYMPTOMSIncompatibility Warnings may appear when you are trying to make a project with binary compatibility even though no subroutine or function declaration has changed.
CAUSEIf a function declaration contains an optional parameter with a default value in the declaration that does not use a valid enum, Visual Basic will define it as a short, which conflicts with the compiled version which is a long.
RESOLUTIONInstall Visual Studio 97 Service Pack 2 or use a valid enumeration in the Function or Subroutine declaration.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug has been fixed in Visual Studio 97 Service Pack 2. For more information on the Visual Studio 97 Service Pack 2, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q170365 TITLE : INFO: Visual Studio 97 Service Packs - What, Where, and WhyFor a list of the Visual Basic 5.0 bugs that were fixed in the Visual Studio 97 Service Pack 2, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q171554 TITLE : INFO: Visual Basic 5.0 Fixes in Visual Studio 97 Service Pack 2 MORE INFORMATIONThis will only affect optional default parameters that do not use valid enumerations when setting the parameter to a default value.
Steps to Reproduce Behavior
As a workaround, if the declaration above used a valid enumeration such as the following, the error would not occur:
Public Sub foo( Optional x as DrawModeConstanst = vbBlackness) End Sub Keywords : vb5all VS97FixlistSP3 VS97FixlistSP2 VB5FixlistSP2 Version : 5.0 Platform : WINDOWS Issue type : kbbug Solution Type : kbfix kbservicepack |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |