Firstly, I have to admit that I'm a C++ and Salesforce newbie (but not new to programming in general), so this question may appear totally stupid to a more experienced C++ programmer... Anyway, I just can't figure out how to solve it.
I try to create a new CTI connector for a Call Center that not yet has one. I followed the docs for Salesforce Spring '16 (v36.0) and installed Visual Studio 2008 Professional (tried with and without SP1).
I completed Building a CTI Connector Solution in Visual Studio, downloading the Demo Adapter Source Code, creating a new ATL project. When it came to configuring the Code Generation and Linker properties, I found that not all of the options to change were present in my Visual Studio. I currently can't remember exactly which ones, but I can reproduce it if this is a required information.
May main problem started afterwards: As described in Adding a COM Base Class to a CTI Adapter Project I used the ATL wizard to create a new class for my CTI system. It was step 6 that I wasn't able to follow entirely. The documentation says:
By default, the wizard automatically creates a new interface called ISalesforceCTIAdapter. You will need the version of ISalesforceCTIAdapter that has been defined by Salesforce for your new CTI connector. To use Salesforce’s version, open the .h file that the wizard generated (MyAdapterBase.h in the example above). In this file:
Delete the entry for
__interface ISalesforceCTIAdapter : IDispatchand its corresponding attributes and comments.
Now I don't have that code in MyAdapterBase.h. Instead I have something that may or may not be a replacement:
BEGIN_COM_MAP(CMyAdapterBase) COM_INTERFACE_ENTRY(ISalesforceCTIAdapter) COM_INTERFACE_ENTRY(IDispatch) COM_INTERFACE_ENTRY(IConnectionPointContainer) END_COM_MAP()
The same applies to
__event __interface _IMyAdapterBaseEvents; which I'm supposed to delete, but which doesn't exist in my file. Instead I have
BEGIN_CONNECTION_POINT_MAP(CMyAdapterBase) CONNECTION_POINT_ENTRY(__uuidof(_ISalesforceCTIAdapterEvents)) END_CONNECTION_POINT_MAP()
So I tried to delete these, but to no avail. When I now attempt to build the project, I get a
error C2011: 'ISalesforceCTIAdapter' : 'struct' type redefinition, because this is declared in another auto-generated file. Removing it there leads to the next error and so on and so on.
I suppose that this must have something to do with the way the ATL wizard generates the code. Obviously on my systems, something is different from the system that was used to create the docs.
If someone can point into the right direction, for example settings in Visual Studio that I may try or other versions of VS, then please let me know. I would already be happy to learn that I'm not the first one to hit that problem, though I'm probably the first one who's unable to solve it...