软件工程

本类阅读TOP10

·PHP4 + MYSQL + APACHE 在 WIN 系统下的安装、配置
·Linux 入门常用命令(1)
·Linux 入门常用命令(2)
·使用 DCPROMO/FORCEREMOVAL 命令强制将 Active Directory 域控制器降级
·DirectShow学习(八): CBaseRender类及相应Pin类的源代码分析
·基于ICE方式SIP信令穿透Symmetric NAT技术研究
·Windows 2003网络负载均衡的实现
·一网打尽Win十四种系统故障解决方法
·数百种 Windows 软件的免费替代品列表
·收藏---行百里半九十

分类导航
VC语言Delphi
VB语言ASP
PerlJava
Script数据库
其他语言游戏开发
文件格式网站制作
软件工程.NET开发
TAPI General Programming Considerations

作者:未知 来源:月光软件站 加入时间:2005-2-28 月光软件站

不知道该怎么翻译合适,不过内容很象我设计架构时的一些规范和约束. 姑且译为 TAPI 程序设计约定.

一 telephony operation分为异步和同步:
1)异步操作将一个DRV_REQUEST类型dwRequestID作为第一个参数.当操作执行时,可以在函数调用中执行一部分操作,函数返回后可以在另外一个线程中执行其余的操作.操作函数将返回一个负错误码或者正dwRequestID.
当操作最终完成时,执行线程调用ASYNC_COMPLETION,返回REQUEST ID和错误码.
这句话不明白:Service providers should always copy input data from application memory into service provider memory before returning from an asynchronous function.
2)同步操作不需要dwRequestID,也不需要调用ASYNC_COMPLETION
 
NOTE:If the operation completes very rapidly (or the original request returns very slowly), it is possible that the interrupt handler that runs when a physical operation completes may be triggered before the original request returns to the application or even to TAPI. This behavior is allowed. TAPI guarantees that the eventual completion notification to the application is delivered after the original request returns.
 
二 Memory Alloc
在TAPI 函数调用中
App负责分配传递信息所需的内存,TAPI仅仅是填写这些信息.
dwTotalSize指示数据结构总的大小,由调用APP赋值。
dwNeededSize指示需要多少字节来容纳返回的信息,由被TAPI赋值。
dwUserSize指示实际使用的字节数,由TAPI填写
 
当调用数据结构参数中存在可变尺寸信息时,如果dwTotalSize小于数据结构固定header大小,那么,将返回LINEERR/ PHONEERR_STRUCTURETOOSMALL.
 
 
Note: All text strings, regardless of encoding, in variably sized structures should be NULL-terminated according to normal C string-handling conventions.



相关文章

相关软件