.NET平台Winform开发Dialogic公司DMV1200B卡相关XX系统(2)

先把最主要的3个开发文档给大家说一下
1.
文件名:globalcall_api_v8.pdf
标题:<<Dialogic Globall Call APT>>
说明:主要介绍Globall Call相关函数的说明和使用,简称GC函数,以及作为参数使用的特定Struct。初始化通道,等待电话,接受应答等等。

2.
文件名:srl_api_v6.pdf
标题:<<Dialogic Standard Runtime Library API>>
说明:主要是介绍SR相关函数,SR相关函数主要是用来捕获通道动作(如摘机动作,挂机动作等)事件的以及相关处理的函数。

3.
文件名:voice_api_v2.pdf
标题:<<Voice API>>
说明:主要是介绍语音相关函数(基本函数命名都是DX开头),主要用来在通道上放音,停止放音等等。

在.NET中调用DLL函数的具体方式我就不写了,我直接写我在.NET中的应用,和C++对应,便于大家先看明白后理解,按照我使用的顺序来.
GC FUNCTION Example:

 

ContractedBlock.gif ExpandedBlockStart.gif C++中的函数声明
 
   
int GC_CDECL gc_Start(GC_START_STRUCT * startp);
int GC_CDECL gc_Close(LINEDEV linedev);
int GC_CDECL gc_OpenEx(LINEDEV * linedevp, char * devicename, int mode, void * usrattr);
int GC_CDECL gc_GetResourceH(LINEDEV linedev, int * resourcehp, int resourcetype);
int GC_CDECL gc_GetMetaEventEx(METAEVENT * metaeventp, unsigned long evt_handle );
int GC_CDECL gc_ResultInfo(METAEVENT * a_Metaevent, GC_INFO * a_Info);
int GC_CDECL gc_ErrorInfo(GC_INFO * a_Info);
int GC_CDECL gc_GetCallInfo(CRN crn, int info_id, char * valuep);
int GC_CDECL gc_ResetLineDev(LINEDEV linedev, unsigned long mode);
int GC_CDECL gc_WaitCall(LINEDEV linedev, CRN * crnp, GC_WAITCALL_BLK * waitcallp, int timeout, unsigned long mode);
int GC_CDECL gc_AcceptCall(CRN crn, int rings, unsigned long mode);
int GC_CDECL gc_AnswerCall(CRN crn, int rings, unsigned long mode);
int GC_CDECL gc_UnListen(LINEDEV linedev, unsigned long mode);
int GC_CDECL gc_Listen(LINEDEV linedev, SC_TSINFO * sctsinfop, unsigned long mode);

 

 

 

ContractedBlock.gif ExpandedBlockStart.gif C#中对应的声明
 
   
[DllImport( " libgc.dll " , CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
public static extern int gc_Start(IntPtr startp);
[DllImport(
" libgc.dll " , CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
public static extern int gc_Close( int chdev);
[DllImport(
" libgc.dll " , CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
public static extern int gc_OpenEx( ref int linedevp, string devicename, int mode, [MarshalAs(UnmanagedType.AsAny)] Object usrattr);
[DllImport(
" libgc.dll " , CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
public static extern int gc_GetResourceH( int linedevp, ref int resourcehp, int resourcetype);
[DllImport(
" libgc.dll " , CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
public static extern int gc_GetMetaEventEx( ref METAEVENT metaeventp, int ev_handle);
[DllImport(
" libgc.dll " , CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
public static extern int gc_ResultInfo( ref METAEVENT a_Metaevent, ref GC_INFO a_Info);
[DllImport(
" libgc.dll " , CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
public unsafe static extern int gc_ErrorInfo( ref GC_INFO a_Info);
[DllImport(
" libgc.dll " , CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
public static extern int gc_GetCallInfo( int crn, int info_id, StringBuilder valuep);
[DllImport(
" libgc.dll " , CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
public static extern int gc_ResetLineDev( int linedev, int flag);
[DllImport(
" libgc.dll " , CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
public static extern int gc_WaitCall( int linedev, IntPtr crnp, IntPtr waitcallp, int timeout, int mode);
[DllImport(
" libgc.dll " , CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
public static extern int gc_AcceptCall( int crn, int rings, int mode);
[DllImport(
" libgc.dll " , CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
public static extern int gc_AnswerCall( int crn, int rings, int mode);
[DllImport(
" libgc.dll " , CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
public static extern int gc_UnListen( int linedev, int mode);
[DllImport(
" libgc.dll " , CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
public unsafe static extern int gc_Listen( int linedev, SC_TSINFO * sctsinfop, uint mode);

 

 

C#开发Dialogic语音卡应用程序正确的数据封送很重要,正确的封送能够正确调用DLL,专注于业务流程开发。但是恰恰这里,是个难点,各种情况足够写一本书的,对于没有相关经验的人来说,太痛苦了。还好我们拥有MSDN和搜索引擎。想要了解的人在MSDN中搜索“数据封送”和“Marshall类”。 

转载于:https://www.cnblogs.com/Assuka/archive/2010/04/01/1702077.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
.NET 6.0 Winform 管理系统是一个基于.NET 6.0框架开发的应用程序,使用Winform作为界面设计工具,主要用于企业的信息管理和业务流程管理。该系统可以帮助企业实现员工管理、客户管理、订单管理、库存管理、财务管理等功能,提高企业的工作效率和管理水平。 该系统采用了.NET 6.0框架,具有良好的稳定性和安全性,可以在Windows操作系统上稳定运行。同时,利用Winform提供的丰富的界面设计工具和控件,开发了直观友好、操作简单的用户界面,方便用户快速上手和操作。 系统主要包括用户登录模块、权限管理模块、基础数据管理模块、业务数据管理模块等功能模块。用户可以通过登录模块进行身份验证,并根据权限进行相应的操作。管理员可以通过权限管理模块对用户的权限进行管理。在基础数据管理模块中,可以对企业的基础信息进行管理,如员工档案、客户信息、产品信息等。在业务数据管理模块中,可以对企业的具体业务进行管理,如订单处理、库存管理、财务收支等。 .NET 6.0 Winform 管理系统不仅可以提高企业的信息化管理水平,还可以提高工作效率,减少人力成本,提升企业的竞争力。同时,系统还具有良好的扩展性和定制性,可以根据企业的实际需求进行定制开发,满足不同类型企业的管理需求。因此,该系统在企业中具有广泛的应用前景和市场需求。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值