Windows error 0x80045063, -2147200925

Detailed Error Information

SPERR_NOT_ACTIVE_SESSION[1]

MessageNeither audio output and input is supported for non-active console sessions.
Declared insperror.h

HRESULT analysis[2]

FlagsSeverityFailure
Reserved (R)false
OriginMicrosoft
NTSTATUSfalse
Reserved (X)false
FacilityCode4 (0x004)
NameFACILITY_ITF[2][3]
DescriptionThe source of the error code is COM/OLE Interface management.[2][3]
Error Code20579 (0x5063)

Questions

1vote
1answer

Simple text to speech with SAPI in a Windows Service

Why does the following code fail after Speak() with error code 0x80045063 (SPERR_NOT_ACTIVE_SESSION) only when the process is running as a service? ISpVoicePtr pVoice; CoCreateInstance( CLSID_SpVoice, 0, CLSCTX_INPROC_SERVER, IID_ISpVoice, ( LPVOID * ) &pVoice ); pVoice->SetOutput( 0, TRUE ); pVoice->Speak( L"Hello", 0, NULL ); The only resources I can come [...] read more
c++
sapi

Comments

Leave a comment

(plain text only)

Sources

  1. sperror.h from Windows SDK 10.0.14393.0
  2. https://msdn.microsoft.com/en-us/library/cc231198.aspx
  3. winerror.h from Windows SDK 10.0.14393.0

User contributions licensed under CC BY-SA 3.0