I am trying to follow the steps of a Simple COM Tutorial which looks nice and logical to me. I would normally shy away from using a wizard but consensus seems to be this is the best way to do COM.
To summarize
- Create an ATL project with the wizard
- Use the Add Class dialog to create an ATL simple object (
SimpleChatServer
in the example) - Navigate into ClassView, right click the interface for the object, Add Method (
CallMe
in the example) - The tutorial gives a method body to use
- Compile
My compilation, however, fails because
error C2509: 'CallMe' : member function not declared in 'CSimpleChatServer'
Has something gone wrong with the wizard? I would have expected VS to automatically declare the CallMe method in CSimpleChatServer, and provide a method stub for me to add the implementation, which it didn't.
(Another difference from the tutorial is that the class browser doesn't show the class CSimpleChatServer, which you would think it would. Might this be because I have disabled intellisense? Hopefully a separate issue).
So, what to do, where and how do I define and declare the actual C++ method with the functionality?