ATL 7.0 Creating Clients for COM Components
-
I'm at the edge right now. I've spent all afternoon trying to create a client for the simplest of COM components. I started an ATL project library. I added a class Calculator with the interface ICalculator. Now I just want to make a trivial client that calls the Add method. I can't get anything to work. I try to include "../Calculator.h" into the Client code but I get errors with DECLARE_PROTECT_FINAL_CONSTRUCT. Including _Utils.tlb isn't helping at all. Can anyone point me to where I can find a simple tutorial for creating clients for ATL 7.0 com objects? Jared jparsons@jparsons.org www.prism.gatech.edu/~gte477n
-
I'm at the edge right now. I've spent all afternoon trying to create a client for the simplest of COM components. I started an ATL project library. I added a class Calculator with the interface ICalculator. Now I just want to make a trivial client that calls the Add method. I can't get anything to work. I try to include "../Calculator.h" into the Client code but I get errors with DECLARE_PROTECT_FINAL_CONSTRUCT. Including _Utils.tlb isn't helping at all. Can anyone point me to where I can find a simple tutorial for creating clients for ATL 7.0 com objects? Jared jparsons@jparsons.org www.prism.gatech.edu/~gte477n
You're including the wrong file I'm afraid. If your COM-dll projects is named XYZ, include the autogenerated XYZ.h. Also make sure you include XYZ_i.c somewhere, perhaps stdafx.cpp? It contains the GUIDs related to your interfaces and classes. Either that or #import "XYZ.dll" -- Only in a world this shitty could you even try to say these were innocent people and keep a straight face.