newcall活动 - TAPI& cprog.exe [英] newcall event - TAPI & cprog.exe
问题描述
我正在开发一个位于cprog.exe旁边的WM 5.0应用程序,并在TAPI的帮助下监视来电。如果呼叫者匹配给定的号码,我的编程会丢弃呼叫。问题是cprog.exe在我的应用程序检查完呼叫之前就开始播放铃声了。有没有人知道如何防止这种情况发生?
Hi, I'm developing an application for WM 5.0 that sits beside cprog.exe and monitor incoming calls with the help of TAPI. If the caller matches a given number my prog drops the call. The problem is that cprog.exe starts to play the ringtone before my app is done checking the callerid. Does anyone got any idea of how I can prevent this from happening?
推荐答案
嗨Slinky,
请按以下代码查找yoru要求:
私人
Hi Slinky,
Please find teh code below for yoru requirement:
private
ArrayList stateList = new ArrayList (); ArrayList stateList = new ArrayList();
SystemState _statePhoneIncoming; SystemState _statePhoneIncoming;
SystemState _StatePhoneActiveCount; < font size = 2> SystemState _StatePhoneActiveCount;
SystemState _phoneCaller; SystemState _phoneCaller;
SystemState _ localData; 私人 SystemState _localData; private void _phoneCaller_Changed( object sender, ChangeEventArgs args) { void _phoneCaller_Changed(object sender, ChangeEventArgs args)
{ 串 s = SystemState 。PhoneIncomingCallerName + SystemState 。PhoneIncomingCallerNumber; string s = SystemState.PhoneIncomingCallerName + SystemState.PhoneIncomingCallerNumber;
< span style ="color:#2b91af; font-size:x-small"> MessageBox MessageBox.Show(s);
} } private void Form1_Load( 对象 发件人, EventArgs e) { private void Form1_Load(object sender, EventArgs e)
{ SystemState s; s = SystemState s;
s = 新 SystemState ( SystemProperty 。PhoneIncomingCall); s.Changed + = new SystemState(SystemProperty.PhoneIncomingCall);
s.Changed += new ChangeEventHandler (ChangeOccurred); stateList.Add(s); new ChangeEventHandler(ChangeOccurred);
stateList.Add(s); _phoneCaller = _phoneCaller = new SystemState ( SystemProperty 。PhoneIncomingCallerNumber, true ); _phoneCaller.Changed + = new SystemState(SystemProperty.PhoneIncomingCallerNumber, true);
_phoneCaller.Changed += new ChangeEventHandler (_ phoneCaller_Changed); } new ChangeEventHandler(_phoneCaller_Changed);
} 这篇关于newcall活动 - TAPI& cprog.exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
如果您对此有任何疑问,请与我们联系。
问候,
Malleswar
Please let me know if you have any queries regarding this.
Regards,
Malleswar