Skip to main content
JADarnell
Inspiring
February 13, 2007
Question

Getting a compiler error

  • February 13, 2007
  • 2 replies
  • 281 views
Hello All:<br /><br /> I have some code provided to me by Adobe for building a selection suite. In the .FR I have this:<br /><br /> AddIn<br /> {<br /> kIntegratorSuiteBoss,<br /> kInvalidClass,<br /> {<br /> IID_IMYSELECTIONSUITE, kMySelectionSuiteASBImpl,<br /> }<br /> },<br /><br /> AddIn<br /> {<br /> kLayoutSuiteBoss,<br /> kInvalidClass,<br /> {<br /> IID_IMYSELECTIONSUITE, kMySelectionSuiteCSBImpl,<br /> }<br /> },<br /><br />Please assume that all definitions and declarations and PMIDs, etc., have been declared in the appropriate auxiliary files.<br /><br />I copied the files implementing the above verbatim into the project.<br /><br />This is how I instantiate the interface in the code:<br /><br /> ISelectionManager* iSelMgr = ActiveContext -> GetContextSelection();<br /><br /> InterfacePtr<IMySelectionSuite> mySelectionSuite(iSelMgr, UseDefaultIID());<br /><br />The problem is that when I compile the module, I get the following error message:<br /><br />C:\Program Files\Adobe\InDesignCSAndInCopyCSSDK\source\sdksamples\codesnippets\SnpTestSelectionSuite.cpp(178): error C2664: 'InterfacePtr<IFace>::InterfacePtr(const IPMUnknown *,PMIID)' : cannot convert parameter 1 from 'ISelectionManager *' to 'const IPMUnknown *'<br /> with<br /> [<br /> IFace=IMySelectionSuite<br /> ]<br /><br />I can make this disappear by casting iSelMgr to type IPMUnknown, but somehow that doesn't feel right.<br /><br />As far as I can tell, I have the right headers included in the file. Anyone have any suggestions about how to resolve this error message without the ambiguity of using IPMUnknown?
This topic has been closed for replies.

2 replies

JADarnell
JADarnellAuthor
Inspiring
February 16, 2007
Strizh:

That was a bonehead problem wasn't it? Sigh. Thanks for your solution.

R,
John
Participating Frequently
February 15, 2007
Add to source file<br /><br />#include <ISelectionManager.h>