c++ - How to dynamically linking sapi.dll and making it work? -


i dynamically bind windows sapi.dll , call code needed 'speak' text on windows - code below (this snippet copied gamedev.net article desmond lang) have no experience in using dll's especialy com. tell me how code should work my? tnx

   // voice interface pointer     ispvoice* voice = null;      // initialize com     coinitialize ( null );      // create voice instance     cocreateinstance ( clsid_spvoice, null, clsctx_all, iid_ispvoice, (void**)&voice );      // our text spoken     wchar* textbuffer = "hello world";      // use our voice interface speak contents of buffer     voice -> speak ( textbuffer, spf_default, null );  


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -