I have been working with Microsoft's Speech API 5.1, and now need to use the extended functionality in SAPI 5.3. In SAPI 5.3, the new Interface ISpRecognizer2 extends ISpRecognizer from SAPI 5.1. Now I create an instance of an ISpRecognizer2 and it works fine for the extended functions such as SetTrainingState(). But when I try to execute functions such as SetInput() that are in ISpRecognizer, I get the error "'SetInput' : is not a member of 'ATL::_NoAddRefReleaseOnCC
omPtr<T>' with [ T=ISpRecognizer2 ].
I'm a relative novice to C++, but have used Java and Smalltalk for decades, and it has always been true that a class or interface extending another one inherits all the functions of the base class. I know that C++ Interfaces are a bit of a workaround, but don't understand how to create an instance of the extended interface that executes functions from both levels of interface. I'm sure it's simple, but I haven't found any documentation.
The SAPI 5.3 is at http://msdn.microsoft.com/en-us/library/ms720424(VS.85).aspx
The code snippet shows the creation and cases of methods that work and don't.
Thanks for the help!
cpRecognizer->SetTrainingState(TRUE, TRUE);//THIS FROM EXTENDED INTERFACE WORKS
cpRecognizer->SetInput(cpStream, TRUE);//THIS FROM BASE INTERFACE GETS ERROR