Microsoft KB Archive/150003

= FIX: __vfptr Elements Are Not Properly Displayed in Debugger =

Article ID: 150003

Article Last Modified on 12/1/2003

-

APPLIES TO

 The Integrated Debugger, when used with:  Microsoft Visual C++ 5.0 Learning Edition

 Microsoft Visual C++ 5.0 Learning Edition

 Microsoft Visual C++ 4.2 Enterprise Edition

 Microsoft Visual C++ 4.0 Professional Edition</li></ul>

 Microsoft Visual C++ 4.1 Subscription</li></ul>

 Microsoft Visual C++ 4.2 Professional Edition</li></ul> </li></ul>

-

<div class="notice_section">

This article was previously published under Q150003

<div class="symptoms_section">

SYMPTOMS
When you view the theApp variable in an AppWizard-generated MFC application, the element values of __vfptr are not properly displayed in the debugger. For an example, please see the "More Information" section of this article.

<div class="resolution_section">

RESOLUTION
Drag the address of __vfptr into the memory window, view the data in long-hex format, and notice that the addresses to which the __vfptr variable points appear.

<div class="status_section">

STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug was corrected in Visual C++ version 5.0.

<div class="moreinformation_section">

Example
<ol> Create a default AppWizard MFC application. In the InitInstance, view the theApp variable in the watch window.</li>  Expand the theApp variable to view the following tree structure: theApp CWinApp CWinThread CCmdTarget CObject __vfptr = 0x00405118  // This is correct </li></ol>

Under Windows NT: [0] CXX0030: Error: expression cannot be evaluated [1] CXX0030: Error: expression cannot be evaluated [2] CXX0030: Error: expression cannot be evaluated [3] CXX0030: Error: expression cannot be evaluated [4] CXX0030: Error: expression cannot be evaluated Under Windows 95 (All values are incorrect): [0] 0xf000e681 [1] 0xf000ff47 [2] 0xf000ff47 [3] 0xf000ff47 [4] 0xf000ff47

Additional query words: kbVC400bug

Keywords: kbbug kbfix kbide kbvc500fix kbdebug KB150003

-

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

© Microsoft Corporation. All rights reserved.