Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define COBJMACROS
- #include <sapi.h>
- #include <ole2.h>
- #include <stdio.h>
- int main(int argc, char* argv[])
- {
- ISpVoice * pVoice = NULL;
- HRESULT hr;
- if (FAILED(CoInitialize(NULL))) return FALSE;
- hr = CoCreateInstance(&CLSID_SpVoice, NULL, CLSCTX_ALL, &IID_ISpVoice, (void **)&pVoice);
- if( SUCCEEDED( hr ) )
- {hr = ISpVoice_Speak(pVoice, L"Hello world", 0, NULL); ISpVoice_Release(pVoice); pVoice = NULL;}
- CoUninitialize();
- return TRUE;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement