C语言的代码 typedef struct { DJ_S8 m_s8ServerIp[32]; /*XMS server ip*/ DJ_U32 m_u32ServerPort; /*XMS server port*/ DJ_S8 m_s8UserName[32]; /**/ DJ_S8 m_s8UserPwd[32]; /**/ }ServerID_t;/**/ /**/ ServerID_t cfg_ServerID; /*调用acsOpenStream 建立与ACS服务器的连接*/ r = XMS_acsOpenStream ( &g_acsHandle, &cfg_ServerID, g_u8UnitID, // App Unit ID 32, // sendQSize, in K Bytes 32, // recvQSize, in K Bytes cfg_s32DebugOn, // Debug On/Off NULL); 人家把C代码转成ActiveX控件 在NET中 AcsOpenStream(ref int acsHandle, ref int serverID, short u8AppID, int u32SendQSize, int u32RecvQSize, int s32DebugOn, ref int privateData); ref int serverID serverID应该对应的是ServerID_t类型,那为怎么会变成 (ref int serverID) INT哪? 怎么解决啊。
给你一个我引用的例子phone = new AxEXSoftPhone.AxSoftphone(); phone.Parent = panel1; phone.Size = new System.Drawing.Size(220, 310); phone.OnCTIEvent += new AxEXSoftPhone.@__Softphone_OnCTIEventEventHandler(this.axSoftphone1_OnCTIEvent); phone.OnAppEvent += new AxEXSoftPhone.@__Softphone_OnAppEventEventHandler(this.axSoftphone1_OnAppEvent);private void axSoftphone1_OnAppEvent(object sender, AxEXSoftPhone.__Softphone_OnAppEventEvent e) { //干活 }
然后在 解决方案资源管理器->项目->引用->(右键)添加引用(R)->COM->选择你刚才注册的组件{查阅路径}..
最后就 using 命名空间; 直接使用即可..
^ō^
C语言的代码
typedef struct
{
DJ_S8 m_s8ServerIp[32]; /*XMS server ip*/
DJ_U32 m_u32ServerPort; /*XMS server port*/
DJ_S8 m_s8UserName[32]; /**/
DJ_S8 m_s8UserPwd[32]; /**/
}ServerID_t;/**/
/**/
ServerID_t cfg_ServerID;
/*调用acsOpenStream 建立与ACS服务器的连接*/
r = XMS_acsOpenStream ( &g_acsHandle,
&cfg_ServerID,
g_u8UnitID, // App Unit ID
32, // sendQSize, in K Bytes
32, // recvQSize, in K Bytes
cfg_s32DebugOn, // Debug On/Off
NULL);
人家把C代码转成ActiveX控件
在NET中 AcsOpenStream(ref int acsHandle, ref int serverID, short u8AppID, int u32SendQSize, int u32RecvQSize, int s32DebugOn, ref int privateData); ref int serverID serverID应该对应的是ServerID_t类型,那为怎么会变成 (ref int serverID) INT哪? 怎么解决啊。
phone.Parent = panel1;
phone.Size = new System.Drawing.Size(220, 310);
phone.OnCTIEvent += new AxEXSoftPhone.@__Softphone_OnCTIEventEventHandler(this.axSoftphone1_OnCTIEvent);
phone.OnAppEvent += new AxEXSoftPhone.@__Softphone_OnAppEventEventHandler(this.axSoftphone1_OnAppEvent);private void axSoftphone1_OnAppEvent(object sender, AxEXSoftPhone.__Softphone_OnAppEventEvent e)
{
//干活 }