当前位置:编程学习 > wap >>

如何在Pocket PC 2003(实验机为多普达818)上部署WM 5.0的短信截获程序啊?

如题。下面是我短信截获的程序
private MessageInterceptor _SMSCatcher = new MessageInterceptor(InterceptionAction.NotifyAndDelete, true);
        private MessageCondition _SMSFilter = new MessageCondition();

        //



        void _SMSCatcher_MessageReceived(object sender, MessageInterceptorEventArgs e)
        {
            //截获的短信对象
            //SmsMessage mySMS = (SmsMessage)e.Message;
            MessageBox.Show("来短信拉!");
            //其它处理

        }


        public Form1()
        {
            InitializeComponent();
            // 初始化短信过滤对象 
            //指定短信截获后的处理事件
            try
            {
                _SMSCatcher.MessageReceived += new MessageInterceptorEventHandler(_SMSCatcher_MessageReceived);
                //短信过滤设置
                _SMSFilter.Property = MessageProperty.Body;  //设置截获依据,这里为短信内容
                _SMSFilter.ComparisonType = MessagePropertyComparisonType.StartsWith; //设置与截获依据的比对方式
                _SMSFilter.CaseSensitive = true;
                _SMSFilter.ComparisonValue = "welcome to mye homepage!"; //过滤字段内容
            }
            catch (Exception ex) { }
            //_SMSCatcher.MessageCondition = _SMSFilter; 
        }

_SMSCatcher.MessageReceived += new MessageInterceptorEventHandler(_SMSCatcher_MessageReceived);这行代码报错,说找不到Microsoft.WindowsMobile.Utilities组件,本人在Google上搜了一下有不少老外有同样问题,但都没有明确的解决办法,望高手指点。 --------------------编程问答-------------------- 补充说明,在Pocket PC的模拟器上运行出现同样错误,在Windows Mobile 5.0CE模拟器上运行正常 --------------------编程问答-------------------- 818是Windows Mobile 2003的系统
你用5.0的程序部署,当然不可能用了
你先把程序用2003的开发包编译后测试吧
补充:移动开发 ,  Windows Phone
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,