I posted this to some of the microsoft newsgroups with no response.
Thought I would give it a try here. Anyway...
I have an MFC program that uses the Microsoft Speech SDK (SAPI 5.1).
It runs great. But, after converting the program into a Win32
Service executable, I now have problems initializing SAPI on Windows
2003 Server. The service runs fine under Windows 2000 Server, and
Windows XP Pro.
The CoCreateInstance call is successful, but the call to
GetOutputStream fails with a returned hresult of 0x8004503a
(-2147200966). This is defined in sperror.h:
/*** SPERR_NOT_FOUND 0x8004503a -2147200966
* The requested data item (data key, value, etc.) was not found.
#define SPERR_NOT_FOUND MAKE_SAPI_ERROR(0x03a)
Here's my sample code:
hr = m_cpVoice.CoCreateInstance(CLSID_SpVoice);
logfile << "Could not instantiate Speech Encoder" << endl;
hr = m_cpVoice->GetOutputStream(&m_cpStream);
hr = Fmt.AssignFormat(m_cpStream);
logfile << "Error getting voice output stream" << endl;
Any help would be greatly appreciated.