The information in this article applies to:
SYMPTOMSUsing the ATL Interface Wizard from Visual C++ 5.0 to add a method to an interface, you will get compilation errors C2061 if you specified any of the following for parameters in the dialog box:
CAUSEThis problem is caused by a limitation in the ATL COM Interface Wizard. RESOLUTION
To cause the ATL code to compile, you must make modifications to the method
that was added with the ATL COM Interface wizard in the .h and .cpp files.
The correct declarations for header file should be:
The correct definitions for source file should be:
You will notice that if you use the above method, the Class view
information in the Tree view may look different for CATLObj. Test and Test2
will not be in the IATLObj interface section in Class view for CATLObj as
they were before. They are now in the member function section. You can
correct this behavior by not making the changes above; and instead, using a
macro. To do this, make the following modifications to the header file
before the class definition:
Class view will now properly display the new methods under the interface
section instead of under the member function section.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. MORE INFORMATIONSteps to Reproduce Behavior
Additional query words:
Keywords : kbwizard kbATL200bug kbAutomation kbCOMt kbVC500bug kbGrpMFCATL kbCollectionClass |
Last Reviewed: November 23, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |