unsafe public static bool Start_Talk(uint from, uint to, int num) { CallAddr pFrom = new CallAddr(); CallAddr pTo = new CallAddr(); pFrom.tid = from; pFrom.box_id = 0; pTo.tid = to; pTo.box_id = num; return(IPCAST_Start_Talk(ref pFrom, ref pTo)); }
/// <summary> /// 控制终端发起寻呼( 1. 目前2.3.12.D06版本只支持终端主机发起寻呼,不支持指定分控面板发起寻呼;2. 目前2.3.12.D06版本只支持对单个目标终端发起寻呼,不支持呼叫多个目标终端) /// </summary> /// <param name="from">发起寻呼终端ID和分控面板号</param> /// <param name="to">寻呼目标终端ID和分控面板号</param> /// <param name="target_number">寻呼目标个数</param> /// <returns>成功:返回TRUE 失败:返回FALSE</returns> unsafe public static bool StartSpeech(uint from, ref uint[] to, int target_number) { CallAddr pFrom = new CallAddr() { tid = from, box_id = 0 }; int structSize = Marshal.SizeOf(typeof(CallAddr)); IntPtr pArray = Marshal.AllocHGlobal((int)new IntPtr(structSize) * target_number); CallAddr *pTo = (CallAddr *)pArray.ToPointer(); for (int i = 0; i < target_number; i++) { pTo[i].tid = to[i]; pTo[i].box_id = 0; } bool bret = ITCAPI_Start_Speech(ref pFrom, pArray, target_number); Marshal.FreeHGlobal(pArray); return(bret); }
public static extern bool ITCAPI_Start_Speech(ref CallAddr from, IntPtr target, int target_number);
public static extern bool ITCAPI_Start_Talk(ref CallAddr from, ref CallAddr target);