BUG: Constant Double Variables in Type Libraries Display Incorrectly in the Visual Basic Object Browser (297814)



The information in this article applies to:

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

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.

MORE INFORMATION

Steps to Reproduce Behavior

  1. 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.
  2. Verify the value by using OLE View. To do this, follow these steps:
    1. 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.
    2. 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.
    3. Browse to the .tlb file that you want to view and click Open.
    4. Using the viewer that you just opened, locate a declared constant double value in your type library. The declaration resembles the following:
      [helpstring("Value of D")] const double d = 6;
      						
      You will compare this value with the value that is displayed in the Object Browser.

  3. In Visual Basic, start a new project.
  4. 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.
  5. On the View menu, select Object Browser, or press F2. The Object Browser loads.
  6. Filter the data by selecting the appropriate library from the <All Libraries> box.
  7. 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.
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.

Modification Type:MajorLast Reviewed:10/15/2002
Keywords:kbBug kbDSupport kbide kbIDEProject KB297814