FIX: Editing the IDL File May Cause ClassView Shortcuts to Fail (194841)



The information in this article applies to:

  • Microsoft Visual C++, 32-bit Enterprise Edition 5.0
  • Microsoft Visual C++, 32-bit Enterprise Edition 6.0
  • Microsoft Visual C++, 32-bit Professional Edition 5.0
  • Microsoft Visual C++, 32-bit Professional Edition 6.0
  • Microsoft Visual C++, 32-bit Learning Edition 6.0

This article was previously published under Q194841

SYMPTOMS

After editing the project IDL file by hand, you may receive the following error when trying to add a method or property to an interface using the ClassView shortcuts Add Method and Add Property:
Unable to create the function because the header or the implementation file could not be found.

RESOLUTION

Save the IDL file before using the ClassView shortcuts Add Method and Add Property.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.

This problem was corrected in Microsoft Visual C++ .NET.

MORE INFORMATION

Steps to Reproduce Behavior

CASE 1:

  1. Create a default ATL COM AppWizard project.
  2. In ClassView, right-click on the root node and select New Class. Add a new ATL Class Interface pair.
  3. Open the project's IDL file in the Source editor.
  4. Add five blank lines anywhere above the interface you added as part of step 2.

    NOTE: Do not save anything at this point. The unsaved change is key to causing the problem.
  5. In ClassView, right-click on the interface created in step 2 and select Add Method. Complete the Add Method dialog box and click OK.

    RESULT: The error described in the SYMPTOMS section is displayed. Click OK to dismiss the error dialog box and click Cancel to dismiss the Add Method dialog box.
  6. Manually save the project's IDL file and repeat step 5.

    RESULT: The error does not occur.
CASE 2:

  1. In the project's IDL file, add a source file comment above or below any method or property in any declared interface.

    NOTE: Do not save anything at this point. The unsaved change is key to causing the problem.
  2. Repeat steps 5 and 6 from CASE 1.

Modification Type:MajorLast Reviewed:12/10/2003
Keywords:kbBug kberrmsg kbfix kbide kbNoUpdate kbwizard KB194841