Speech Shortcut

  • Thread starter Thread starter community.devexpress.com
  • Start date Start date
C

community.devexpress.com

I'm having trouble creating an instance of the ISpShortcut . Here is my
code.


using SpeechLib;
using System.Speech;


ISpShortcut shortcut = new ISpShortcut();

shortcut.AddShortcut("myAdress",1033,"123 Main, Anytown, ST. USA
12345",SPSHORTCUTTYPE.SPSHT_OTHER);



Here is the error msg: "Cannot create an instance of the abstract class or
interface'SpeechLib.ISpShortcut'

Any help would be appreciated.
 
I'm having trouble creating an instance of the ISpShortcut . Here is my
code.


using SpeechLib;
using System.Speech;


The problem is this line:
ISpShortcut shortcut = new ISpShortcut();

You cannot directly instantiate an interface type. You must instead
instantiate a class that implements the ISpShortcut interface. The MSDN
documentation for SAPI is not as pretty as the .NET class docs, so I can't
tell what classes implement this interface to even begin to give you an
example.
 
Back
Top