Microsoft KB Archive/297814

= BUG: Constant Double Variables in Type Libraries Display Incorrectly in the Visual Basic Object Browser =

Article ID: 297814

Article Last Modified on 10/15/2002

-

APPLIES TO


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

-



This article was previously published under Q297814



SYMPTOMS
When you select a loaded type library in the Object Browser and view the value of a constant double variable, the Help string of the previously selected Object Browser item is displayed instead of the variable's constant value.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



Steps to Reproduce Behavior
 Either create a new type library by using MkTypLib or MIDL, or use an existing type library (.tlb) file that contains a definition for a constant double value. Verify the value by using OLE View. To do this, follow these steps:  Click Start, point to Programs, point to Microsoft Visual Studio 6.0, point to Microsoft Visual Studio 6.0 Tools, and then click OLE View. In the OLE Viewer, click the TypeLib Viewer button that has three red triangles, or click View TypeLib on the File menu. An Open dialog box appears. Browse to the .tlb file that you want to view and click Open.  Using the viewer that you just opened, locate a declared constant double value in your type library. The declaration resembles the following: [helpstring(&quot;Value of D&quot;)] const double d = 6; You will compare this value with the value that is displayed in the Object Browser. </li></ol>

</li> In Visual Basic, start a new project.</li> On the Project menu, select References, select the .tlb file that you selected previously, and click OK.

NOTE: You may have to use the Browse button in the References dialog box to locate the type library.</li> On the View menu, select Object Browser, or press F2. The Object Browser loads.</li> Filter the data by selecting the appropriate library from the <All Libraries> box.</li> Find the constant double value that you located by using the OLE Viewer. The location of this value differs depending on the type library you are using. After you have located the constant double, notice that the value that is assigned to it is not the same value that was assigned to it in the OLE Viewer.</li></ol>

Select different values, including the constant double value. Note that when you select the constant double value, it is always equal to the Help string of the previously selected Object Browser item.

Keywords: kbbug kbide kbpending kbideproject KB297814

-

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

© Microsoft Corporation. All rights reserved.