请问butterfly seekerr是做高端的吗?

WinCE 上的EDB数据库读写非常麻烦,网上到处可以找到相关的思路和代码片断。但是没有一个好的封装思路,网络上唯一个的一个封装类(忘记谁的了)于我来说是不方便使用的,于是我就参考那篇文章,自己做了一次封装,在可用性、方便性、灵活性上做了很大程度的改进和优化。当然,这个发布版本可能还存在一些问题,希望有意者可以改进。
TMD的2008终于过去了。虽然2008于我来说比较顺利,但是我却不喜欢。太多的回忆只能选择让它消逝,籍此慰籍苦累的心。新的一年,总有新的理想,但是现实的脚步跟不上理想的翅膀,留作新的希望在新的一年重复着。。。我一直在问自己、告诉自己,2009年,我要做点什么?!不抱怨现实的残酷,不抱怨变化的突然,不抱怨理想的遥远,只抱定努力的意志。工作啊工作,日复一日,年复一年。是为了那平淡简单的生活还是为了那短暂的光阴?喜欢Beyond 的歌,总是能够给人一种宣泄,一种力量,一种信念,让你从心酸的共鸣中振作,冲破看穿世事的烦恼和苦闷,从一开始就没有选择,因为你不在需要徘徊。但是,2009初始,这一种信念是否能够陪伴自己慢慢度过未知的岁月?心里刻下的理想,一直一直牵引着我。。。。。。
2008年已过去一大半,回顾这大半年,我却像是做梦。。。
爱有多重? 你心中的她是你的全部吗? 爱一个人很难。。。
很久没来博客更新东西了,主要是没空。我跳槽了,远离家乡,千里迢迢来到这个陌生的城市混日子。。。。以后我会常来这里更新。
原理很简单:处理鼠标进入、退出、单击消息就行了,不同状态读入不同图片。// 首发本人博客,转载请注明出处:myseeker.bokee.comH文件://---------------------------------------------------------------------------#ifndef Unit1H#define Unit1H//---------------------------------------------------------------------------#include &Classes.hpp&#include &Controls.hpp&#include &StdCtrls.hpp&#include &Forms.hpp&#include &ExtCtrls.hpp&#include &jpeg.hpp&//---------------------------------------------------------------------------class TForm1 : public TForm{__published: // IDE-managed Components
TPanel *pnlB
TImage *imgB
TImage *Image1;
TPaintBox *PaintBox1;
void __fastcall imgBtnMouseDown(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y);
void __fastcall imgBtnMouseUp(TObject *Sender, TMouseButton Button,
TShiftState Shift, int X, int Y);
void __fastcall Pai
关于大数运算,无非就是用数组来保存所谓的大整数,网上的算法很多,但是没有一个是有关除法的!原因在于除法比较复杂。在朋友的帮助下,经过自己认真思索,最终实现了大整数除法的程序。
提问:某男买了三件礼品,分别送给前女友、现女友和未来女友,三件礼品分别是:抱枕、胸针、坠饰。请问他每一样礼品分别送给谁 ?我没有合适的答案,知道的兄弟姐妹请告诉我。谢谢。。。。我自己的体会就是:坠饰:一直戴在身上的吧? 那么你就不会忘记过去拥有过的。所以应该送坠饰给过去的。抱枕: 不可能时时在身边,但是是最能够给你温暖和安慰的。该送抱枕给现在的。胸饰:好看不实在,就是华而不实,未来的事谁能说清楚?该送胸饰给未来的。感觉自己很无聊。。。。。
嗯,2007年了,新的一年总该有新的东西吧? 开始学习Protel了,仅仅为了自己做一个USB设备。 万事开头难,凭着自己的10年电子电路经验,对于电子技术的学习,上手还算挺快的。呵呵、、、、 好不容易下载到了Protel2004,为什么不用protel99呢?可能我喜欢尝鲜吧,再说99 版不稳定。同时下载了 SP2----SP4的补丁,好大!!加起来足足有1.7G!安装之前看了很多网上的安装说明,看得冷汗直出。很多人说在xp系统下安装会出问题,说什么要改语区域设置,才可以安装。当然,我从来不轻易相信别人的意见,我决定自己试一下。 安装原版 protel dxp2004,发现没有任何问题,接着继续安装补丁和元件库。顺利无比!!好开心啊,没有遇到任何问题。 安装完毕,打开看了一下界面。熟悉了一下操作,丢开了,上网找教程去了。 从今天开始,要学习电路设计了。
!!! 转载记得注明作者和出处 !!做人要厚道!!一:ACE其实是一个开源的C++类库,提供了一些模式,框架,出色地解决如下问题:1. 程序移植问题2. 分布式应用问题二:ACE windows下编译:先下载好ACE的源码,当前最新的release版本是5.5解压后打开ACE_wrappersace根据需要修改config.h文件,如在windows下编译为:#include “ace/config-win32.h”接下来打开相应的dws文件或sln文件即可进行编译编译全部工程大约需要半小时,VC 可以自动编译的。三:ACE 相关设置要做的设置有下面几点(以VC6为例):Tools-&options-&directors设置:Include file添加 ACE所在目录ACE_WRAPPERSProject-&settings-&c/c++-&code generation -&debug multithreaded或multithreadedProjcet-&settings-&link 添加 ACED.LIB或ACE.LIB注意若是动态链接库的ACE,运行时需要将ACED.DLL或ACE.DLL和EXE文件放在同个目录四:开始编写程序1为了体现ACE的
画报点击数0
文章点击数0DJMAX2_seeker(4B)AC【人人网 - 分享】
DJMAX2_seeker(4B)AC
分享这个视频的人喜欢
分享这个视频的人也爱看
小女子不才,可借公子一生陪伴可否
午夜场开始!!
因为遇见,才喜欢
等风也等你
哪吒头复现
不睡觉的进来谈谈人生
热门视频推荐
热门日志推荐
同类视频推荐
北京千橡网景科技发展有限公司:
文网文[号··京公网安备号·甲测资字
文化部监督电子邮箱:wlwh@vip.sina.com··
文明办网文明上网举报电话: 举报邮箱:&&&&&&&&&&&&
请输入手机号,完成注册
请输入验证码
密码必须由6-20个字符组成
下载人人客户端
品评校花校草,体验校园广场posts - 104,&
comments - 773,&
trackbacks - 6
本篇文章主要讲述短信拦截的一些方法,虽然该方法不是最理想的方法,但仍然能够达到相同的功效。
作为高级篇的第一篇文章,希望文中的一些API的使用方法,能够给更多人予以帮助。
在.net 2.0中,MS就提供了Microsoft.WindowsMobile.PocketOutlook.MessageInterception命名空间,通过使用该命名空间,可以截获短信和邮件的到达消息。
该命名空间中的一些类及属性:
1.MessageInterceptor:监控对象类,一旦添加监控事件后,就会对所有消息进行监控。
2.MessageCondition:监控的过滤筛选条件类,通过设置需要过滤某个字段。
3.MessageInterceptorEventHandler:监控事件,一旦截获某消息,就立即执行该方法。
4.InterceptionAction(枚举):
Notify(提示,但此时系统仍会第一时间处理,自定义处理虽然有效,但肯定不是大家想要的。)
NotifyAndDelete(系统不会做任何处理,直接交给用户自己处理,同时达到的消息,如果用户不处理,则会删除。)
5.MessageProperty(枚举):按照某个属性进行对比
6.MessagePropertyComparisonType(枚举):对比方法
运行程序效果如下:
在Menu菜单下,点击Message Intercepter事件,开始监听。在此,我设置了,当发短消息的用户为Test Man时,将短消息过滤,不会在短消息的收件箱中出现,截获的内容这会在界面上显示。
测试:运行Cellular Emulator程序,输入电话号码及短信内容,发送到模拟器上。
模拟器效果如下:
可以看到消息已经被截获了,且消息内容一致。
如果发送号码为,则不是添加的联系人(Test Man)。则不会截获。
代码如下:
&1&&&&&&&&private&void&menuItem4_Click(object&sender,&EventArgs&e)
&2&&&&&&&&{
&3&&&&&&&&&&&&MessageInterceptor&msgInterceptor&=&new&MessageInterceptor();
&4&&&&&&&&&&&&msgInterceptor.InterceptionAction&=&InterceptionAction.NotifyAndD
&6&&&&&&&&&&&&MessageCondition&msgCondition&=&new&MessageCondition();
&7&&&&&&&&&&&&msgCondition.ComparisonType&=&MessagePropertyComparisonType.C
&8&&&&&&&&&&&&msgCondition.Property&=&MessageProperty.S
&9&&&&&&&&&&&&msgCondition.ComparisonValue&=&"Test&Man";
<span style="font-family: ; color: #
<span style="font-family: ; color: #&&&&&&&&&&&&msgInterceptor.MessageCondition&=&msgC
<span style="font-family: ; color: #
<span style="font-family: ; color: #&&&&&&&&&&&&msgInterceptor.MessageReceived&+=&new&MessageInterceptorEventHandler(msgInterceptor_MessageReceived);
<span style="font-family: ; color: #&&&&&&&&}
<span style="font-family: ; color: #
<span style="font-family: ; color: #&&&&&&&&void&msgInterceptor_MessageReceived(object&sender,&MessageInterceptorEventArgs&e)
<span style="font-family: ; color: #&&&&&&&&{
<span style="font-family: ; color: #&&&&&&&&&&&&this.listBox1.Items.Add("Type&Name:&"&+&e.Message.GetType().Name);
<span style="font-family: ; color: #
<span style="font-family: ; color: #&&&&&&&&&&&&if&(e.Message.GetType()&==&typeof(SmsMessage))
<span style="font-family: ; color: #&&&&&&&&&&&&{
<span style="font-family: ; color: #&&&&&&&&&&&&&&&&SmsMessage&sms&=&(SmsMessage)e.M
<span style="font-family: ; color: #&&&&&&&&&&&&&&&&this.listBox1.Items.Add("From:&"&+&sms.From.Name);
<span style="font-family: ; color: #&&&&&&&&&&&&&&&&this.listBox1.Items.Add("Body:&"&+&sms.Body);
<span style="font-family: ; color: #&&&&&&&&&&&&&&&&this.listBox1.Items.Add("Received&Tiem:&"&+&sms.Received.ToString("yyyy-MM-dd"));
<span style="font-family: ; color: #&&&&&&&&&&&&}
<span style="font-family: ; color: #&&&&&&&&&&&&if&(e.Message.GetType()&==&typeof(EmailMessage))
<span style="font-family: ; color: #&&&&&&&&&&&&{
<span style="font-family: ; color: #&&&&&&&&&&&&&&&&EmailMessage&mail&=&(EmailMessage)e.M
<span style="font-family: ; color: #
<span style="font-family: ; color: #&&&&&&&&&&&&&&&&this.listBox1.Items.Add("ItemId:&"&+&mail.ItemId.ToString());
<span style="font-family: ; color: #&&&&&&&&&&&&}
<span style="font-family: ; color: #&&&&&&&&}
1.使用MessageInterceptor能监视的只是一个属性,如果根据不同用户,指定不同过滤操作的话,就无法实现。
2.一旦将InterceptionAction设为NotifyAndDelete,则系统就不做处理了,接收到的消息,就不会在收件箱中出现,需要自己添加进去(下文会介绍如何实现)
3.可以不设置MessageInterceptor的MessageCondition,这样使得所有消息都截获,然后自己处理,这时,就可以设置更广泛的过滤。
一旦将消息全部截获后,必不可少的会遇到一些不需要过滤的消息,此时,还要将消息重新放入收件箱中。很遗憾,暂时在托管环境中没有相应的操作类,相信MS会在以后的CF版本中会对此进行扩展的。
下面将介绍如何SIM卡的短消息的API。
涉及的API:
SimInitialize方法:初始化SIM卡的对象指针。
SimDeinitialize方法:释放SIM卡指针,类似于Ado里的连接对象,操作完后,关闭对象。
SimGetSmsStorageStatus方法:得到SIM卡里的可以存放的最大消息个数及已存放的消息个数。
SimReadMessage方法:从SIM卡中读取短信(如果SIM卡有短信)。
SimWriteMessage方法:向SIM卡中写入或修改短信。
SimDeleteMessage方法:删除SIM卡中某条短信。
涉及的结构体:
SimMessageTag:定义某条消息中的所有信息。
SystemTime:自定义的一个时间结构体。
在运行的程序中点击Test事件,则会读取SIM卡中所有短信,并且向SIM卡中添加一条短信。
运行该事件前,短信收件箱。
运行结果,读取SIM卡中的短信内容(只有1条)。
查看短信收件箱,该短信已写入。
通过这些API,我们可以很方便的将自己需要的短信写入SIM,而在过滤事件中过滤不需要的。
代码如下:
&&1&&&&&&&&[DllImport("cellcore.dll",&SetLastError=true)]
&&2&&&&&&&&private&static&extern&int&SimInitialize(int&dwFlags,&int&lpfnCallBack,&int&dwParam,&out&int&lphSim);
&&4&&&&&&&&[DllImport("cellcore.dll",&SetLastError&=&true)]
&&5&&&&&&&&private&static&extern&int&SimDeinitialize(int&hSim);
&&7&&&&&&&&[DllImport("cellcore.dll",&SetLastError&=&true)]
&&8&&&&&&&&public&static&extern&int&SimGetSmsStorageStatus(int&hSim,&int&dwStorage,&ref&int&lpdwUsed,&ref&int&lpdwTotal);
&10&&&&&&&&[DllImport("cellcore.dll",&SetLastError&=&true)]
&11&&&&&&&&private&static&extern&int&SimWriteMessage(int&hSim,&int&dwStorage,&ref&int&lpdwIndex,&ref&SimMessageTag&SmsStructType);
&13&&&&&&&&[DllImport("cellcore.dll",&SetLastError&=&true)]
&14&&&&&&&&private&static&extern&int&SimReadMessage(int&hSim,&int&dwStorage,&int&lpdwIndex,&ref&SimMessageTag&SmsStructType);
&16&&&&&&&&[DllImport("cellcore.dll",&SetLastError&=&true)]
&17&&&&&&&&private&static&extern&int&SimDeleteMessage(int&hSim,&int&dwStorage,&ref&int&lpdwIndex);
&19&&&&&&&&private&void&menuItem6_Click(object&sender,&EventArgs&e)
&20&&&&&&&&{
&21&&&&&&&&&&&&int&hSim&=&<span style="color: #,&res&=&<span style="color: #;
&23&&&&&&&&&&&&try
&24&&&&&&&&&&&&{
&25&&&&&&&&&&&&&&&&res&=&SimInitialize((int)SIM_INIT_NONE,&<span style="color: #,&(int)SIM_PARAM_MSG_ALL,&out&hSim);
&27&&&&&&&&&&&&&&&&if&(res&!=&<span style="color: #)
&28&&&&&&&&&&&&&&&&&&&&throw&new&Exception("Could&not&initialize&SIM");
&30&&&&&&&&&&&&&&&&int&used&=&<span style="color: #,&total&=&<span style="color: #;
&32&&&&&&&&&&&&&&&&res&=&SimGetSmsStorageStatus(hSim,&(int)SIM_NUMSMSSTORAGES,&ref&used,&ref&total);
&34&&&&&&&&&&&&&&&&if&(res&==&<span style="color: #)
&35&&&&&&&&&&&&&&&&{
&36&&&&&&&&&&&&&&&&&&&&this.listBox1.Items.Add("Used:&"&+&used.ToString());
&37&&&&&&&&&&&&&&&&&&&&this.listBox1.Items.Add("Total:&"&+&total.ToString());
&38&&&&&&&&&&&&&&&&}
&39&&&&&&&&&&&&&&&&else
&40&&&&&&&&&&&&&&&&{
&41&&&&&&&&&&&&&&&&&&&&this.listBox1.Items.Add("Last&Error:&"&+&Marshal.GetLastWin32Error().ToString());
&42&&&&&&&&&&&&&&&&}
&44&&&&&&&&&&&&&&&&SimMessageTag&message&=&new&SimMessageTag();
&46&&&&&&&&&&&&&&&&int&index&=&<span style="color: #;
&48&&&&&&&&&&&&&&&&//res&=&SimDeleteMessage(hSim,&(int)SIM_SMSSTORAGE_BROADCAST,&ref&index);
&50&&&&&&&&&&&&&&&&//if&(res&!=&0)
&51&&&&&&&&&&&&&&&&//{
&52&&&&&&&&&&&&&&&&//&&&&this.listBox1.Items.Add("Last&Error:&"&+&Marshal.GetLastWin32Error().ToString());
&53&&&&&&&&&&&&&&&&//}
&54&&&&&&&&&&&&&&&&//this.listBox1.Items.Add("Index:&"&+&index.ToString());
&56&&&&&&&&&&&&&&&&for&(int&j&=&<span style="color: #;&j&&=&&j++)
&57&&&&&&&&&&&&&&&&{
&58&&&&&&&&&&&&&&&&&&&&res&=&SimReadMessage(hSim,&(int)SIM_NUMSMSSTORAGES,&j,&ref&message);
&59&&&&&&&&&&&&&&&&&&&&if&(res&==&<span style="color: #)
&60&&&&&&&&&&&&&&&&&&&&{
&61&&&&&&&&&&&&&&&&&&&&&&&&this.listBox1.Items.Add("From:&"&+&message.lpszAddress);
&62&&&&&&&&&&&&&&&&&&&&&&&&this.listBox1.Items.Add("CBSize:&"&+&message.cbSize.ToString());
&63&&&&&&&&&&&&&&&&&&&&&&&&this.listBox1.Items.Add("Address&Type:&"&+&message.dwAddressType.ToString());
&64&&&&&&&&&&&&&&&&&&&&&&&&this.listBox1.Items.Add("NumPlan:&"&+&message.dwNumPlan.ToString());
&65&&&&&&&&&&&&&&&&&&&&&&&&this.listBox1.Items.Add("Params:&"&+&message.dwParams.ToString());
&66&&&&&&&&&&&&&&&&&&&&&&&&char[]&header&=&new&char[message.rgbHeader.Length];
&67&&&&&&&&&&&&&&&&&&&&&&&&string&msg&=&"";
&68&&&&&&&&&&&&&&&&&&&&&&&&for&(int&i&=&<span style="color: #;&i&&&message.rgbHeader.L&i++)
&69&&&&&&&&&&&&&&&&&&&&&&&&{
&70&&&&&&&&&&&&&&&&&&&&&&&&&&&&header[i]&=&(char)message.rgbHeader[i];
&71&&&&&&&&&&&&&&&&&&&&&&&&&&&&msg&+=&header[i].ToString();
&72&&&&&&&&&&&&&&&&&&&&&&&&}
&73&&&&&&&&&&&&&&&&&&&&&&&&this.listBox1.Items.Add("Header:&"&+&msg);
&74&&&&&&&&&&&&&&&&&&&&&&&&this.listBox1.Items.Add("Receive&Time:&"&+&message.stReceiveTime.ToString());
&75&&&&&&&&&&&&&&&&&&&&&&&&this.listBox1.Items.Add("Message:&"&+&message.lpszMessage);
&76&&&&&&&&&&&&&&&&&&&&&&&&this.listBox1.Items.Add("");
&77&&&&&&&&&&&&&&&&&&&&}
&78&&&&&&&&&&&&&&&&&&&&else
&79&&&&&&&&&&&&&&&&&&&&{
&80&&&&&&&&&&&&&&&&&&&&&&&&this.listBox1.Items.Add("Last&Error:&"&+&Marshal.GetLastWin32Error().ToString());
&81&&&&&&&&&&&&&&&&&&&&}
&82&&&&&&&&&&&&&&&&}
&84&&&&&&&&&&&&&&&&SimMessageTag&msg1&=&new&SimMessageTag();
&85&&&&&&&&&&&&&&&&msg1.cbSize&=&message.cbS
&86&&&&&&&&&&&&&&&&msg1.dwAddressType&=<span style="color: #;
&87&&&&&&&&&&&&&&&&msg1.dwNumPlan&=&<span style="color: #;
&88&&&&&&&&&&&&&&&&msg1.dwParams&=&<span style="color: #1;
&89&&&&&&&&&&&&&&&&msg1.lpszAddress&=&"<span style="color: #3456789";
&90&&&&&&&&&&&&&&&&msg1.stReceiveTime&=&new&global::SystemTime(System.DateTime.Now);
&91&&&&&&&&&&&&&&&&msg1.lpszMessage&=&"It&is&a&test&mail!";
&92&&&&&&&&&&&&&&&&msg1.cbHdrLength&=&<span style="color: #;
&93&&&&&&&&&&&&&&&&msg1.rgbHeader&=&new&byte[<span style="color: #6];
&95&&&&&&&&&&&&&&&&index&=&used&+&<span style="color: #;
&97&&&&&&&&&&&&&&&&res&=&SimWriteMessage(hSim,&(int)SIM_NUMSMSSTORAGES,&ref&index,&ref&msg1);
&98&&&&&&&&&&&&&&&&if&(res&!=&<span style="color: #)
&99&&&&&&&&&&&&&&&&{
<span style="color: #0&&&&&&&&&&&&&&&&&&&&this.listBox1.Items.Add("Last&Error:&"&+&Marshal.GetLastWin32Error().ToString());
<span style="color: #1&&&&&&&&&&&&&&&&}
<span style="color: #2&&&&&&&&&&&&}
<span style="color: #3&&&&&&&&&&&&catch&(Exception&ex)
<span style="color: #4&&&&&&&&&&&&{
<span style="color: #5&&&&&&&&&&&&&&&&MessageBox.Show(ex.Message);
<span style="color: #6&&&&&&&&&&&&}
<span style="color: #7&&&&&&&&&&&&finally
<span style="color: #8&&&&&&&&&&&&{
<span style="color: #9&&&&&&&&&&&&&&&&this.listBox1.Items.Add("Result:&"&+&res.ToString());
<span style="color: #0&&&&&&&&&&&&&&&&SimDeinitialize(hSim);
<span style="color: #1&&&&&&&&&&&&}
<span style="color: #2&&&&&&&&}
在DllImport中定义SetLastError,这样在调用API出错时,可以通过Marshal.GetLastWin32Error()来取得ErrorCode。
SimInitialize方法的第一个参数,网上很多直接写0,为什么是0,因为常量SIM_INIT_NONE定义为0。
在操作SIM卡消息时的所有方法都需要dwStorage参数,该参数常量定义为:
SIM_NUMSMSSTORAGES = 2,从SIM卡里读取
SIM_SMSSTORAGE_BROADCAST = 1,从设备本地读取
添加一条消息时,该消息结构体的赋值中
dwAddressType = 1 (SIM_ADDRTYPE_INTERNATIONAL)
dwNumPlan = 1 (SIM_NUMPLAN_TELEPHONE)
dwParams = 111 必须设为111,否则添加不了,该数字是属性累加起来的
cbHdrLength = 0 (短信头的长度通常为0)
&1[StructLayout(LayoutKind.Sequential)]
&2public&struct&SystemTime
&4&&&&public&short&wY
&5&&&&public&short&wM
&6&&&&public&short&wDayOfW
&7&&&&public&short&wD
&8&&&&public&short&wH
&9&&&&public&short&wM
<span style="color: #&&&&public&short&wS
<span style="color: #&&&&public&short&wM
<span style="color: #
<span style="color: #&&&&public&SystemTime(System.DateTime&now)
<span style="color: #&&&&{
<span style="color: #&&&&&&&&wYear&=&(short)now.Y
<span style="color: #&&&&&&&&wMonth&=&(short)now.M
<span style="color: #&&&&&&&&wDayOfWeek&=&(short)now.DayOfW
<span style="color: #&&&&&&&&wDay&=&(short)now.D
<span style="color: #&&&&&&&&wHour&=&(short)now.H
<span style="color: #&&&&&&&&wMinute&=&(short)now.M
<span style="color: #&&&&&&&&wSecond&=&(short)now.S
<span style="color: #&&&&&&&&wMilliseconds&=&(short)now.M
<span style="color: #&&&&}
<span style="color: #&&&&public&override&string&ToString()
<span style="color: #&&&&{
<span style="color: #&&&&&&&&return&string.Format("{0}/{1}/{2}",&wYear,&wMonth,&wDay);
<span style="color: #&&&&}
<span style="color: #}
<span style="color: #
<span style="color: #[StructLayout(LayoutKind.Sequential)]
<span style="color: #public&struct&SimMessageTag
<span style="color: #{
<span style="color: #public&int&cbS&//&Size&of&the&structure&in&bytes
<span style="color: #public&int&dwP&//Indicates&valid&parameter&values
<span style="color: #
<span style="color: #[MarshalAs(UnmanagedType.ByValTStr,&SizeConst&=&<span style="color: #6)]
<span style="color: #public&string&lpszA&//An&array&that&contains&the&actual&phone&number
<span style="color: #
<span style="color: #public&int&dwAddressT&//A&SIM_ADDRTYPE&constant
<span style="color: #/**//*
<span style="color: #SIM_ADDRTYPE_UNKNOWN&=&Unknown.
<span style="color: #SIM_ADDRTYPE_INTERNATIONAL&=&International&number.
<span style="color: #SIM_ADDRTYPE_NATIONAL&0ne&National&=&number.
<span style="color: #SIM_ADDRTYPE_NETWKSPECIFIC&Network&=&specific&number.
<span style="color: #SIM_ADDRTYPE_SUBSCRIBER&Subscriber&=&number
<span style="color: #(protocol-specific).
<span style="color: #SIM_ADDRTYPE_ALPHANUM&Alphanumeric&=&address.
<span style="color: #SIM_ADDRTYPE_ABBREV&Abbreviated&=&number.
<span style="color: #*/
<span style="color: #
<span style="color: #public&int&dwNumP&//A&SIM_NUMPLAN&constant
<span style="color: #/**//*
<span style="color: #SIM_NUMPLAN_UNKNOWN&=&Unknown.
<span style="color: #SIM_NUMPLAN_TELEPHONE&=&ISDN/telephone&numbering&plan
<span style="color: #(E.164/E.163).
<span style="color: #SIM_NUMPLAN_DATA&=&Data&numbering&plan&(X.121).
<span style="color: #SIM_NUMPLAN_TELEX&=&Telex&numbering&plan.
<span style="color: #SIM_NUMPLAN_NATIONAL&=&National&numbering&plan.
<span style="color: #SIM_NUMPLAN_PRIVATE&=&Private&numbering&plan.
<span style="color: #SIM_NUMPLAN_ERMES&ERMES&=&numbering&plan&(ETSI&DE/PS&3&01-3).
<span style="color: #*/
<span style="color: #
<span style="color: #public&SystemTime&stReceiveT&//Timestamp&for&the&incoming&message
<span style="color: #
<span style="color: #public&int&cbHdrL&//Header&length&in&bytes
<span style="color: #
<span style="color: #[MarshalAs(UnmanagedType.ByValArray,&SizeConst&=&<span style="color: #6)]
<span style="color: #public&byte[]&rgbH&//An&array&containing&the&actual&header&data
<span style="color: #
<span style="color: #[MarshalAs(UnmanagedType.ByValTStr,&SizeConst&=&<span style="color: #6)]
<span style="color: #public&string&lpszM&//An&array&containing&the&actual&message&data
<span style="color: #}
字段长度设置,根据参考该dll的头文件定义的,为256
1.在调查dll的某些API的过程确实很复杂,需要不断尝试,这里推荐大家,一旦调用出错,可以通过Marshal.GetLastWin32Error()来取得ErrorCode,这样可以知道错误类型。在调用API时,尽量多参考其头文件,这样可以很方便了解这些方法中的一些结构体及一些常量。
2.如果运行模拟器的话,向SIM卡里添加短信后,在短信收件箱中不会显示出来,但实际是添加进去了。必须通过关闭电话,然后重新设置电话网络,这样SIM卡会重新加载。实际的设备应该不会这样。
本文提供给大家在.net cf下如何实现短信拦截的一个思路,该方法确实是可行的,希望大家能够掌握。短信拦截的方法不是唯一的,以后会介绍别的方法。
代码下载(附头文件以便大家能够理解):
Author:AppleSeeker
阅读(...) 评论()

我要回帖

更多关于 bioseeker 的文章

 

随机推荐