Microsoft KB Archive/194841

= FIX: Editing the IDL File May Cause ClassView Shortcuts to Fail =

Article ID: 194841

Article Last Modified on 12/10/2003

-

APPLIES TO


 * Microsoft Visual C++ 5.0 Enterprise Edition
 * Microsoft Visual C++ 6.0 Enterprise Edition
 * Microsoft Visual C++ 5.0 Professional Edition
 * Microsoft Visual C++ 6.0 Professional Edition
 * Microsoft Visual C++ 6.0 Standard Edition

-



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.



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.
 * 1) 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.
 * 1) 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.
 * 1) Repeat steps 5 and 6 from CASE 1.

Keywords: kberrmsg kbbug kbfix kbnoupdate kbide kbwizard KB194841

-

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

© Microsoft Corporation. All rights reserved.