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
Post a Comment