Posted: Fri May 10, 2002 12:48 am
Restored from previous forum. Originally posted by Arbitrage.
I bought purebasic a few months ago and haven't had time to play with it yet.
What I'm wondering is how to initialize COM. Here's some simple code from the help file the name of the dll is sapi.dll. If someone could help get started on this. There's also VB source and DHML source using activex. I haven't seen much on how to access .DLL's.
#include
#include
int main(int argc, char* argv[])
{
ISpVoice * pVoice = NULL;
if (FAILED(::CoInitialize(NULL)))
return FALSE;
HRESULT hr = CoCreateInstance(CLSID_SpVoice, NULL, CLSCTX_ALL, IID_ISpVoice, (void **)&pVoice);
if( SUCCEEDED( hr ) )
{
hr = pVoice->Speak(L"Hello world", 0, NULL);
pVoice->Release();
pVoice = NULL;
}
::CoUninitialize();
return TRUE;
}
S
I bought purebasic a few months ago and haven't had time to play with it yet.
What I'm wondering is how to initialize COM. Here's some simple code from the help file the name of the dll is sapi.dll. If someone could help get started on this. There's also VB source and DHML source using activex. I haven't seen much on how to access .DLL's.
#include
#include
int main(int argc, char* argv[])
{
ISpVoice * pVoice = NULL;
if (FAILED(::CoInitialize(NULL)))
return FALSE;
HRESULT hr = CoCreateInstance(CLSID_SpVoice, NULL, CLSCTX_ALL, IID_ISpVoice, (void **)&pVoice);
if( SUCCEEDED( hr ) )
{
hr = pVoice->Speak(L"Hello world", 0, NULL);
pVoice->Release();
pVoice = NULL;
}
::CoUninitialize();
return TRUE;
}
S