青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

隨筆 - 74, 文章 - 0, 評論 - 26, 引用 - 0
數(shù)據(jù)加載中……

(msdn)Using MFC to Automate SAPI (SAPI 5.3)http://msdn2.microsoft.com/en-us/library/ms717069.aspx

Microsoft Speech API 5.3   用oleview 可以產(chǎn)生 idl 文件 再用 midl工具 可以產(chǎn)生 tlb,h,c 存根文件 等.

Using MFC to Automate SAPI

Introduction

The Microsoft Foundation Classes (MFC) provides an easy and convenient way to automate calls to SAPI using its Class Wizard to generate wrappers for the SAPI layer from the SAPI Type Library.

In order to accomplish this, perform the following steps:

  1. Create a new MFCAppWizard(exe) project in Visual C++.
  2. Based on the type of application you are creating, follow the wizard prompts. In Step 3 of the wizard prompts, (or Step 2 if you are creating a Dialog Based application) make sure that the Automation check box is selected under the heading, What other support would you like to include?

Once the new project is ready, access Class Wizard.

  1. Click the Automation tab, and then click Add Class and select From a type library in the drop-down list.
  2. Browse for the sapi.dll file and open it.
  3. Select the classes you would like Class Wizard to generate a wrapper for. The resulting default header and implementation files are sapi.h and sapi.cpp respectively. The rest of this document assumes that you have chosen to use these default file names. Click OK.
  4. You should now be back in the Class Wizard window. Click OK.
After you are done with the above steps, Visual C++ will automatically add the Class Wizard generated files sapi.cpp and sapi.h to your project.

Upon viewing the sapi.h file, you should notice that it is nothing more than an automation wrapper that has been generated for all the classes you selected. Notice that all the classes inherit from COleDispatchDriver, hence the dispatch interface needs to be set up. This only requires a few lines of simple code, after which the wrapper class can be used just like any other C++ class.

Example

This example assumes that you chose to generate a wrapper for the ISpeechVoice class from among any other classes you may have selected. Using the project created above, include the sapi.h file within a source file in the project that will make automation calls to SAPI using the wrapper. In that source file, type the following code.

CLSID CLSID_SpVoice;    // class ID for the SAPI SpVoice object
LPDISPATCH pDisp; // dispatch interface for the class
ISpeechVoice voice; // use the MFC Class Wizard generated wrapper

CLSIDFromProgID(L"SAPI.SpVoice", &CLSID;_SpVoice);
voice.CreateDispatch(CLSID_SpVoice);
pDisp = voice.m_lpDispatch;

HRESULT hr = pDisp->QueryInterface(CLSID_SpVoice, (void**)&voice;.m_lpDispatch);

if (hr == S_OK) {
pDisp->Release();
}
else {
voice.AttachDispatch(pDisp, TRUE);
}

voice.Speak("hello world", 1); // asynchronous call to Speak method of ISpeechVoice interface

If you have been following the steps outlined above properly, you should hear your computer say "hello world!" That's all there is to using MFC to make automation calls to SAPI. Currently however, not all the wrapper classes generated by MFC's Class Wizard work properly. For instance, the ISpeechLexicon interface does not work. The work around for this is to implement your own automation wrapper classes using C++. The steps to do that are beyond the scope of this document. Of course, you can always use the COM interfaces in C++ and Automation in Visual Basic to ensure that every interface in SAPI works easily and flawlessly.

posted on 2007-11-20 09:06 井泉 閱讀(1205) 評論(1)  編輯 收藏 引用 所屬分類: C++

評論

# re: (msdn)Using MFC to Automate SAPI (SAPI 5.3)http://msdn2.microsoft.com/en-us/library/ms717069.aspx[未登錄]  回復(fù)  更多評論   

你好,我在試驗這個例子的時候遇見了問題。我不知道Example的那段代碼應(yīng)該加到哪里。我試驗了一下,出現(xiàn)了錯誤。所以,希望你能詳細的指點我一下,可以么?謝謝啦!我的郵箱是:nvllnvll@126.com
2010-03-19 22:07 | Harry
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            欧美专区在线观看| 亚洲一本视频| 欧美日韩免费视频| 欧美高清视频一区二区| 免费日韩成人| 欧美日韩一区二区欧美激情| 欧美日韩一卡| 国产亚洲一区在线| 亚洲国产另类精品专区| 亚洲精品婷婷| 性做久久久久久| 久久综合中文色婷婷| 亚洲国产日韩一区| 亚洲视频导航| 免费看黄裸体一级大秀欧美| 欧美精品一区二区三区很污很色的| 欧美日韩国产综合视频在线观看| 欧美亚洲第一页| 精品9999| 性欧美精品高清| 亚洲福利国产精品| 亚洲欧美日韩另类精品一区二区三区| 久久欧美肥婆一二区| 欧美日韩国产精品成人| 国产一区二区三区久久悠悠色av| 亚洲黄页一区| 久久久噜噜噜久久久| 亚洲免费观看高清完整版在线观看| 亚洲影院色无极综合| 久热这里只精品99re8久| 国产精品久久久一区二区| 亚洲国产精品一区在线观看不卡| 亚洲一区亚洲| 亚洲第一二三四五区| 欧美一级夜夜爽| 欧美午夜电影在线| 亚洲人成毛片在线播放女女| 欧美中文字幕在线视频| 99在线观看免费视频精品观看| 久久久av水蜜桃| 久久九九精品| 亚洲精品无人区| 久久婷婷影院| 国产日韩视频一区二区三区| 一区二区三区精品视频| 欧美成人精品三级在线观看| 裸体丰满少妇做受久久99精品| 欧美日韩色婷婷| 亚洲电影自拍| 久久久久成人精品免费播放动漫| 亚洲精品中文字| 欧美凹凸一区二区三区视频| 国模私拍视频一区| 欧美一区二区在线看| 亚洲欧美日韩精品在线| 91久久精品美女高潮| 老司机精品视频网站| 国产综合视频在线观看| 久久精品一二三区| 欧美一区二区三区四区夜夜大片| 国产精品久久久亚洲一区| 亚洲一区二区在线观看视频| 亚洲激情不卡| 欧美日韩国产成人在线91| 99视频+国产日韩欧美| 亚洲人成人77777线观看| 欧美xart系列高清| 99视频精品在线| 艳女tv在线观看国产一区| 欧美性猛交xxxx乱大交退制版| 亚洲综合国产| 欧美在线亚洲在线| 在线观看日韩国产| 亚洲国产色一区| 国产精品久久久久三级| 欧美亚洲一区二区三区| 久久精品亚洲| 日韩亚洲欧美一区| 一区二区电影免费在线观看| 国产精品久久福利| 欧美在线观看www| 国产欧美日韩伦理| 欧美一区二区成人6969| 亚洲欧美日韩国产成人| 国产亚洲激情视频在线| 蜜桃视频一区| 欧美日韩国产黄| 小黄鸭精品aⅴ导航网站入口| 亚洲欧美成人一区二区在线电影| 国产欧美日韩一级| 亚洲第一在线| 国产精品第十页| 久久综合国产精品| 欧美—级高清免费播放| 午夜久久久久久| 噜噜噜91成人网| 亚洲综合色在线| 欧美主播一区二区三区美女 久久精品人| 久久久99精品免费观看不卡| 欧美亚洲一区三区| 在线电影国产精品| 日韩一区二区高清| 欧美三级在线视频| 国产精品一区久久久| 一区精品在线播放| 一本色道久久88综合日韩精品| 国产精品日日摸夜夜添夜夜av| 久久免费视频在线观看| 欧美日韩国产精品成人| 久久综合影视| 国产精品夜夜嗨| 亚洲国产欧美国产综合一区| 国产亚洲欧美一区二区| 日韩视频在线你懂得| 亚洲福利在线视频| 国产精品成人一区二区网站软件| 中文在线资源观看网站视频免费不卡 | 亚洲乱码国产乱码精品精可以看 | 国产精品二区二区三区| 久久一区二区三区四区五区| 香蕉久久久久久久av网站| 亚洲欧美在线免费| 久久一区激情| 午夜精品视频| 欧美激情国产日韩| 免费亚洲视频| 国内精品久久国产| 亚洲欧洲av一区二区| 亚洲欧美不卡| 国产精品高精视频免费| 亚洲毛片在线观看| 一区二区三区你懂的| 男女av一区三区二区色多| 久久综合色播五月| 一区二区亚洲| 久久久久国产精品午夜一区| 久久国产精品久久久久久| 欧美偷拍一区二区| 99精品免费| 亚洲欧美日韩中文视频| 欧美系列一区| 狼人天天伊人久久| 国产精品一区二区久久国产| 亚洲精品日韩一| 99亚洲一区二区| 欧美精品在线一区二区| 亚洲国产第一| 欧美激情视频一区二区三区免费| 快射av在线播放一区| 国产日韩欧美综合一区| 亚洲欧美日韩国产另类专区| 欧美日产在线观看| 99国产精品视频免费观看| 一本色道久久综合亚洲精品高清| 欧美理论电影网| 亚洲视频精选| 欧美怡红院视频| 国产一区二区无遮挡| 久久人人爽爽爽人久久久| 女同性一区二区三区人了人一| 亚洲成色777777女色窝| 美女视频黄a大片欧美| 亚洲欧洲三级| 性欧美18~19sex高清播放| 国产精品久久久久久亚洲毛片 | 美女主播一区| 99国产精品久久| 亚洲综合社区| 欧美99久久| 夜夜嗨av一区二区三区网站四季av| 欧美日韩国产综合久久| 欧美一区二区三区免费视| 欧美成人国产| 亚洲免费视频中文字幕| 国产一区激情| 欧美日韩三区| 久久在线视频| 亚洲视频1区| 欧美国产高清| 欧美在线不卡| 在线视频精品| 亚洲第一福利视频| 国产欧美精品国产国产专区| 欧美成人精品1314www| 亚洲午夜精品一区二区三区他趣| 免费成人高清在线视频| 亚洲一级在线观看| 亚洲韩国日本中文字幕| 久久福利资源站| 亚洲无限av看| 亚洲日韩欧美视频| 欧美黑人多人双交| 久久久久久亚洲精品不卡4k岛国| 亚洲精品中文字幕有码专区| 国产伦理一区| 欧美四级剧情无删版影片| 欧美第一黄色网| 久久综合激情| 久久一二三四| 欧美亚洲一区三区|