SAPI.H 声明请教

rs369007 2010-06-20 05:10:13
sapi.h 有句声明
typedef interface ISpRecoContext ISpRecoContext; 不知这里interface是什么数据类型,有什么作用



函数定义时这么用的

#include <sapi.h>
#include <atlbase.h>
#include <sphelper.h>

//typedef LONG HRESULT;
inline HRESULT BlockForResult(ISpRecoContext * pRecoCtxt, ISpRecoResult ** ppResult)
{
HRESULT hr = S_OK;
CSpEvent event;

/*#define SUCCEEDED(Status) ((HRESULT)(Status) >= 0)
Provides a generic test for success on any status value. Non-negative numbers indicate success.*/

while (SUCCEEDED(hr) &&
SUCCEEDED(hr = event.GetFrom(pRecoCtxt)) &&
hr == S_FALSE)
{
hr = pRecoCtxt->WaitForNotifyEvent(INFINITE);
}

*ppResult = event.RecoResult();
if (*ppResult)
{
(*ppResult)->AddRef();
}

return hr;
}
...全文
194 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
pengzhixi 2010-06-20
  • 打赏
  • 举报
回复
com里面的吧

69,374

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧