Well what do you know. I took code from your previous question, and removed the ATL stuff (ATL not supported on Visual Studio Express 2010). I was left with this
#include <windows.h>
#include <sapi.h>
#include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
cout << "Hello" << endl;
ISpVoice * pVoice = NULL;
if (FAILED(::CoInitialize(NULL)))
return FALSE;
HRESULT hr = CoCreateInstance(CLSID_SpVoice, NULL, CLSCTX_ALL, IID_ISpVoice, (void **)&pVoice);
if( SUCCEEDED( hr ) )
{
cout << "Succeeded" << endl;
hr = pVoice->Speak(L"Hello world", 0, NULL);
pVoice->Release();
pVoice = NULL;
}
else
{
cout << "Not succeeded" << endl;
}
::CoUninitialize();
return TRUE;
}
I created a standard Windows Console Application project and used this code as the only source file. Compiled and ran it and it worked. It spoke! In a female voice.
I've done zero set up at all. So it obviously works out the box. I never knew about this library before.
I have Windows 7 and VS 2010 express.