??xml version="1.0" encoding="utf-8" standalone="yes"?>秋霞蜜臀av久久电影网免费,国产精品一区专区欧美日韩,精品国产精品三级精品av网址http://www.aygfsteel.com/TiGERTiAN/category/34125.html----TiGERTiANzh-cnSun, 19 Jun 2011 18:49:31 GMTSun, 19 Jun 2011 18:49:31 GMT60Windows Mobile获取基站信息(CellID{?http://www.aygfsteel.com/TiGERTiAN/archive/2011/06/19/352623.htmlTiGERTiANTiGERTiANSun, 19 Jun 2011 10:22:00 GMThttp://www.aygfsteel.com/TiGERTiAN/archive/2011/06/19/352623.htmlhttp://www.aygfsteel.com/TiGERTiAN/comments/352623.htmlhttp://www.aygfsteel.com/TiGERTiAN/archive/2011/06/19/352623.html#Feedback0http://www.aygfsteel.com/TiGERTiAN/comments/commentRss/352623.htmlhttp://www.aygfsteel.com/TiGERTiAN/services/trackbacks/352623.html

在Windows Mobile的手Z? RIL提供了访问Radio模块的接? 下面以一个简单的CZ说明如何在C#中通过RIL获得基站信息?br />需要注意的是,下面的代码可能无法在模拟器上面运行,因ؓ(f)~少必要的类库,在真Z没啥问题?/span>
W一? 定义必要的数据结构和回调函数
1. 包含基站信息的RILCELLTOWERINFOc?br />        public class RILCELLTOWERINFO
        {
            public uint cbSize;
            public uint dwParams;
            public uint dwMobileCountryCode;//中国的MCC?60
            public uint dwMobileNetworkCode;
            public uint dwLocationAreaCode;
            public uint dwCellID;
            public uint dwBaseStationID;
            public uint dwBroadcastControlChannel;
            public uint dwRxLevel;
            public uint dwRxLevelFull;
            public uint dwRxLevelSub;
            public uint dwRxQuality;
            public uint dwRxQualityFull;
            public uint dwRxQualitySub;
            public uint dwIdleTimeSlot;
            public uint dwTimingAdvance;
            public uint dwGPRSCellID;
            public uint dwGPRSBaseStationID;
            public uint dwNumBCCH;
        }
 
2.用于异步q回RIL调用l果的回调函数RILRESULTCALLBACK
        public delegate void RILRESULTCALLBACK(uint dwCode,
                                               IntPtr hrCmdID,
                                               IntPtr lpData,
                                               uint cbData,
                                               uint dwParam);
 
3.在RILd发出notify的时候回调的提醒函数RILNOTIFYCALLBACK
 
        public delegate void RILNOTIFYCALLBACK(uint dwCode,
                                               IntPtr lpData,
                                               uint cbData,
                                               uint dwParam);
注意Q这个提醒函数后面不?x)用刎ͼ但它是作为必要的Native函数的参敎ͼ在pinvoke的时候是不可~少?nbsp;
 
W二? 通过pinvoke引用必要的RIL Native函数 
RIL_Initialize   Q?RIL_GetCellTowerInfoQRIL_Deinitialize
        [DllImport("ril.dll")]
        private static extern IntPtr RIL_Initialize(uint dwIndex,
                                                    RILRESULTCALLBACK pfnResult,
                                                    RILNOTIFYCALLBACK pfnNotify,
                                                    uint dwNotificationClasses,
                                                    uint dwParam,
                                                    out IntPtr lphRil);

        [DllImport("ril.dll")]
        private static extern IntPtr RIL_GetCellTowerInfo(IntPtr hRil);
        [DllImport("ril.dll")]
        private static extern IntPtr RIL_Deinitialize(IntPtr hRil);
 
W三? 通过RIL_GetCellTowerInfo获取基站信息
1.初始化一个RIL的实例ƈq回它的Handle
            hRes = RIL_Initialize(1,                                        // RIL port 1
                                  new RILRESULTCALLBACK(rilResultCallback), // q回调用l果的回调函?br />                                  null,  0, 0,                                      
                                  out hRil);                                //q回RIL实例的handle
 
2.定义回调函数
        private static AutoResetEvent waithandle = new AutoResetEvent(false);
        public static void rilResultCallback(uint dwCode,
                                             IntPtr hrCmdID,
                                             IntPtr lpData,
                                             uint cbData,
                                             uint dwParam)
        {
            //构造一个RILCELLTOWERINFOcȝ于存放数?br />             rilCellTowerInfo = new RILCELLTOWERINFO();
            Marshal.PtrToStructure(lpData, rilCellTowerInfo);
            //回调通知
            waithandle.Set();}
 
3.调用RIL_GetCellTowerInfoq攑ֽ前RIL实例的handle
RIL_GetCellTowerInfo(hRil);
            //{待回调函数q回
            waithandle.WaitOne();
            //释放RIL handle
            RIL_Deinitialize(hRil);
 
l果与分析:(x)
以下是在samsungi718+上的试l果Q?br />-rilCellTowerInfo Q?br />  cbSize 2164262660 uint
  dwBaseStationID 706412084 uint
  dwBroadcastControlChannel 0 uint
  dwCellID 0 uint //其实q里的cellid在我机器上获取不刎ͼ实非常遗憾
  dwGPRSBaseStationID 706412084 uint
  dwGPRSCellID 158440 uint
  dwIdleTimeSlot 33993204 uint
  dwLocationAreaCode 706412076 uint
  dwMobileCountryCode 0 uint //q个MCC中国应该?60Q我q里也没有获取到
  dwMobileNetworkCode 33993204 uint
  dwNumBCCH 706411928 uint
  dwParams 0 uint
  dwRxLevel 4 uint
  dwRxLevelFull 0 uint
  dwRxLevelSub 706412004 uint
  dwRxQuality 706411908 uint
  dwRxQualityFull 158172 uint
  dwRxQualitySub 67853664 uint
  dwTimingAdvance 0 uint
需要注意的是这里的CellTowerInfo在各个机型上面的实现E度不一P文中提到的RIL相关函数严格来说在Windows Mobile 上面都不是必被实现的,使用旉考虑到这一炏V?/div>
实现代码Q?br />
    public partial class Form1 : Form
    {
        
public Form1()
        {
            InitializeComponent();
        }

        
public delegate void RILRESULTCALLBACK(uint dwCode,
                                            IntPtr hrCmdID,
                                            IntPtr lpData,
                                            
uint cbData,
                                            
uint dwParam);


        
public delegate void RILNOTIFYCALLBACK(uint dwCode,
                                               IntPtr lpData,
                                               
uint cbData,
                                               
uint dwParam);

        [DllImport(
"ril.dll")]
        
private static extern IntPtr RIL_Initialize(uint dwIndex,
                                                    RILRESULTCALLBACK pfnResult,
                                                    RILNOTIFYCALLBACK pfnNotify,
                                                    
uint dwNotificationClasses,
                                                    
uint dwParam,
                                                    
out IntPtr lphRil);
        [DllImport(
"ril.dll")]
        
private static extern IntPtr RIL_GetCellTowerInfo(IntPtr hRil);
        [DllImport(
"ril.dll")]
        
private static extern IntPtr RIL_Deinitialize(IntPtr hRil);

        
private static AutoResetEvent waithandle = new AutoResetEvent(false);
        
private static RILCELLTOWERINFO rilCellTowerInfo;
        
private IntPtr hRes;
        
private IntPtr hRil;
        
public static void rilResultCallback(uint dwCode,
                                             IntPtr hrCmdID,
                                             IntPtr lpData,
                                             
uint cbData,
                                             
uint dwParam)
        {
            
//构造一个RILCELLTOWERINFOcȝ于存放数?/span>
            rilCellTowerInfo = new RILCELLTOWERINFO();
            Marshal.PtrToStructure(lpData, rilCellTowerInfo);
            
//回调通知
            waithandle.Set();
        }
 
 

        
private void button1_Click(object sender, EventArgs e)
        {
            hRes 
= RIL_Initialize(1,                                        // RIL port 1
                                 new RILRESULTCALLBACK(rilResultCallback), // q回调用l果的回调函?/span>
                                 null00,
                                 
out hRil);    
            
//q回RIL实例的handle
            RIL_GetCellTowerInfo(hRil);
            
//{待回调函数q回
            waithandle.WaitOne();
            
//释放RIL handle
            RIL_Deinitialize(hRil);

        }
    }

    
public class RILCELLTOWERINFO
    {
        
public uint cbSize;
        
public uint dwParams;
        
public uint dwMobileCountryCode;//中国的MCC?60
        public uint dwMobileNetworkCode;
        
public uint dwLocationAreaCode;
        
public uint dwCellID;
        
public uint dwBaseStationID;
        
public uint dwBroadcastControlChannel;
        
public uint dwRxLevel;
        
public uint dwRxLevelFull;
        
public uint dwRxLevelSub;
        
public uint dwRxQuality;
        
public uint dwRxQualityFull;
        
public uint dwRxQualitySub;
        
public uint dwIdleTimeSlot;
        
public uint dwTimingAdvance;
        
public uint dwGPRSCellID;
        
public uint dwGPRSBaseStationID;
        
public uint dwNumBCCH;
    }


TiGERTiAN 2011-06-19 18:22 发表评论
]]>手机媒体技术简?/title><link>http://www.aygfsteel.com/TiGERTiAN/archive/2010/03/27/316693.html</link><dc:creator>TiGERTiAN</dc:creator><author>TiGERTiAN</author><pubDate>Sat, 27 Mar 2010 07:11:00 GMT</pubDate><guid>http://www.aygfsteel.com/TiGERTiAN/archive/2010/03/27/316693.html</guid><wfw:comment>http://www.aygfsteel.com/TiGERTiAN/comments/316693.html</wfw:comment><comments>http://www.aygfsteel.com/TiGERTiAN/archive/2010/03/27/316693.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/TiGERTiAN/comments/commentRss/316693.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/TiGERTiAN/services/trackbacks/316693.html</trackback:ping><description><![CDATA[<p>原文地址: <a >http://blog.csdn.net/marsgongna/archive/2008/12/04/3442247.aspx</a></p> <p style="text-indent: 21pt; margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体">手机作ؓ(f)Z必备的移动通信工具Q目前在全球已经有超q?/span><font face="Times New Roman">10</font><span style="font-family: 宋体">亿的用户Q其数量q在不断地增ѝ随着Ud多媒体时代的到来Q用手机看电(sh)视,用手机看?sh)?jing)Q用手机听音乐等使用Ud媒体技术的应用Q已l在中国q速发展v来?/span></p> <p style="text-indent: 21pt; margin: 7.8pt 0cm" class="MsoNormal"><strong><span style="font-family: 宋体">一、什么是媒体技术?</span></strong></p> <p style="text-indent: 21pt; margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体">媒体技术是从互联网上发展v来的一U传送多媒体数据的技术,其主要特Ҏ(gu)以流Q?/span><font face="Times New Roman">streaming</font><span style="font-family: 宋体">Q的形式q行多媒体数据的传输。采用流媒体技术的客户端播攑֙在播放一个多媒体内容之前Q预先下载媒体内容的一部分作ؓ(f)~存Q在缓存中的这部分内容向用h攄q程当中Q该多媒体内容的剩余部分在后台从服务器l箋下蝲到客L(fng)播放器上。这P一边客L(fng)播放器在不断播放~冲Z的多媒体内容Q另一边多媒体内容的其他部分从后台服务器不断地传输到缓冲区中,q样实C所?#8220;边下载,Ҏ(gu)?#8221;式播放?/span></p> <p style="text-indent: 21pt; margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体">媒体技术应用到Ud|络和终端上Q称之ؓ(f)Ud媒体技术。从上面所q我们可以看刎ͼUd媒体技术具有三个突出特点:(x)Q?/span><font face="Times New Roman">1</font><span style="font-family: 宋体">Q能够实时播放视音频{多媒体内容Q也可以对多媒体内容q行Ҏ(gu)Q具有交互性。可以让用户摆脱被动接受内容的苦|而灵z自丅R随旉地地选择自己惌看的内容Q从而更加个性化。(</span><font face="Times New Roman">2</font><span style="font-family: 宋体">Q播攄媒体文件不需要在客户端保存,减少了对客户端存储空间的要求Q也减少了缓存容量的需求。(</span><font face="Times New Roman">3</font><span style="font-family: 宋体">Q由于流媒体文g不在客户端保存,从而从一定程度上解决了媒体文件的版权保护问题?/span></p> <p style="text-indent: 21pt; margin: 7.8pt 0cm" class="MsoNormal"><strong><span style="font-family: 宋体">二、手机播放流媒体文g的基本要?/span></strong></p> <p style="text-indent: 21.75pt; margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体">Q一Q手机操作系l?/span></p> <p style="text-indent: 21.75pt; margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体">目前Q智能手机的操作pȝ主要?/span><font face="Times New Roman">Symbian</font><span style="font-family: 宋体">?/span><font face="Times New Roman">Windows Mobile</font><span style="font-family: 宋体">?/span><font face="Times New Roman">Palm</font><span style="font-family: 宋体">?/span><font face="Times New Roman">Linux</font><span style="font-family: 宋体">。其?/span><font face="Times New Roman">Symbian</font><span style="font-family: 宋体">、和</span><font face="Times New Roman">Windows Mobile</font><span style="font-family: 宋体">pȝ的用占据了大多数?/span><font face="Times New Roman"> Palm</font><span style="font-family: 宋体">的䆾额主要来自它?/span><font face="Times New Roman">PDA</font><span style="font-family: 宋体">支持?/span></p> <p style="text-indent: -18pt; margin: 0cm 0cm 0pt 39pt; tab-stops: list 39.0pt" class="MsoNormal"><font face="Times New Roman">1、Symbian</font><span style="font-family: 宋体">操作pȝ</span></p> <p style="text-indent: 21pt; margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Times New Roman">Symbian</font><span style="font-family: 宋体">是诺Z、摩托罗拉、烦(ch)爱立信{几家电(sh)信巨头联合开发的操作pȝQ据l计Q?/span><font face="Times New Roman">Symbian</font><span style="font-family: 宋体">q_的智能手机占?/span><font face="Times New Roman">70%</font><span style="font-family: 宋体">。该操作pȝ以占用资源小、对g要求低、第三方软g支持q泛{优势,成ؓ(f)目前手机市场上应用最为广泛的产品Q?/span><font face="Times New Roman">Symbian</font><span style="font-family: 宋体">操作pȝ下主要?/span><font face="Times New Roman">S60</font><span style="font-family: 宋体">?/span><font face="Times New Roman">UIQ</font><span style="font-family: 宋体">?/span><font face="Times New Roman">S90</font><span style="font-family: 宋体">q三U操作^台?/span></p> <p style="text-indent: 21pt; margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体">Q?/span><font face="Times New Roman">1</font><span style="font-family: 宋体">Q?/span><font face="Times New Roman">Series S60</font><span style="font-family: 宋体">Q?/span><font face="Times New Roman">S60</font><span style="font-family: 宋体">操作q_具备?/span><font face="Times New Roman">Symbian OS</font><span style="font-family: 宋体">操作pȝ操作的简易性,支持</span><font face="Times New Roman">KJAVA</font><span style="font-family: 宋体">?/span><font face="Times New Roman">C++</font><span style="font-family: 宋体">开发的针对单手使用的设计,支持的屏q分辨率?/span><font face="Times New Roman">176*208</font><span style="font-family: 宋体">象素?/span><font face="Times New Roman">S60</font><span style="font-family: 宋体">界面是拥有最多第三方软gQ游戏)的界面,是目?/span><font face="Times New Roman">Symbian</font><span style="font-family: 宋体">pȝ中用最q泛的版本。主要支持的手机以诺Z</span><font face="Times New Roman">7650</font><span style="font-family: 宋体">?/span><font face="Times New Roman">7610</font><span style="font-family: 宋体">?/span><font face="Times New Roman">6260</font><span style="font-family: 宋体">{最为典型?/span></p> <p style="text-indent: 21pt; margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体">Q?/span><font face="Times New Roman">2</font><span style="font-family: 宋体">Q?/span><font face="Times New Roman">UIQ Series</font><span style="font-family: 宋体">Q?/span><font face="Times New Roman">UIQ Series</font><span style="font-family: 宋体">操作q_的特性主要表现在它的多媒体和功能全面的特性?/span><font face="Times New Roman">UIQ Series</font><span style="font-family: 宋体">?/span><font face="Times New Roman">Symbian OS </font><span style="font-family: 宋体">的系l架构下Q专门ؓ(f)高端多媒体手设计,可支持手写操作,使用h非常cM</span><font face="Times New Roman"> PDA </font><span style="font-family: 宋体">操作Q适用人群主要定位在高端商务用戗主要应用有索爱</span><font face="Times New Roman">P</font><span style="font-family: 宋体">pd以及(qing)诺基?/span><font face="Times New Roman">6708</font><span style="font-family: 宋体">?/span><font face="Times New Roman">BENQ P30</font><span style="font-family: 宋体">{?/span></p> <p style="text-indent: 21pt; margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体">Q?/span><font face="Times New Roman">3</font><span style="font-family: 宋体">Q?/span><font face="Times New Roman">Series S90</font><span style="font-family: 宋体">Q?/span><font face="Times New Roman">Series90</font><span style="font-family: 宋体">?/span><font face="Times New Roman">Symbian</font><span style="font-family: 宋体">q_上最q轻的界面,Ҏ(gu)持触ؓ(f)操控模式Q分辨率高达</span><font face="Times New Roman">640*320</font><span style="font-family: 宋体">像素。但目前支持</span><font face="Times New Roman">Series 90</font><span style="font-family: 宋体">的只有诺Z</span><font face="Times New Roman">7700</font><span style="font-family: 宋体">Q未投上市Q和</span><font face="Times New Roman">7710</font><span style="font-family: 宋体">两款手机Q更多第三方软g的支持尚需一定时日?/span></p> <p style="text-indent: 21pt; margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Times New Roman">2</font><span style="font-family: 宋体">?/span><font face="Times New Roman">Windows Mobile</font><span style="font-family: 宋体">操作pȝ</span></p> <p style="text-indent: 21pt; margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体">Q?/span><font face="Times New Roman">1</font><span style="font-family: 宋体">Q?/span><font face="Times New Roman">Pocket PC Phone</font><span style="font-family: 宋体">pȝQ?/span><font face="Times New Roman">Pocket PC</font><span style="font-family: 宋体">是一U手持设备,可帮助用者存储ƈ(g)索电(sh)子邮件、联pMh和约?x)信息,播放多媒体文Ӟ玩赏电(sh)子游戏Q借助</span><font face="Times New Roman">MSN Messenger</font><span style="font-family: 宋体">交换文本消息Q浏?/span><font face="Times New Roman">Web</font><span style="font-family: 宋体">内容{。主要适用机型?/span><font face="Times New Roman">BENQ</font><span style="font-family: 宋体">?/span><font face="Times New Roman">P50</font><span style="font-family: 宋体">以及(qing)多普?/span><font face="Times New Roman">696</font><span style="font-family: 宋体">?/span><font face="Times New Roman">818</font><span style="font-family: 宋体">?/span><font face="Times New Roman">828</font><span style="font-family: 宋体">{机型?/span></p> <p style="text-indent: 21pt; margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体">Q?/span><font face="Times New Roman">2</font><span style="font-family: 宋体">Q?/span><font face="Times New Roman">Smartphone </font><span style="font-family: 宋体">pȝQ同是微软公叔R下的产品Q操作界面和</span><font face="Times New Roman">WINDOWS</font><span style="font-family: 宋体">非常怼Q注重移动互联和׃功能。没有触控笔和触摸屏Q体现单手操控的理念Q全以数字键盘代ѝ适用机型有多普达?/span><font face="Times New Roman">5</font><span style="font-family: 宋体">pd手机?/span></p> <p style="text-indent: 21.75pt; margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体">Q二Q下载安装终端播攑֙</span></p> <p style="text-indent: 21.75pt; margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体">Ҏ(gu)有操作系l及(qing)其不同版本都实现适配的播攑֙是不存在的,Z成本、开发周期及(qing)其它因素的考虑Q属W三方Y件的媒体播攑֙大部分都只是Z以上操作pȝ实现的?/span></p> <p style="text-indent: 21.75pt; margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体">通过</span><font face="Times New Roman">WAP</font><span style="font-family: 宋体">|站Q具备上q操作系l的各型h机,可以直接匚w到适合的流媒体播放器。一般在下蝲后会(x)直接q入到播攑֙E序的安装过E,Ҏ(gu)pȝ提示完成安装后,可以随时、随Cn受移动流媒体服务了?/span></p> <p style="text-indent: 21pt; margin: 7.8pt 0cm" class="MsoNormal"><strong><span style="font-family: 宋体">三、手机播放流媒体文g的一般技术过E?/span></strong></p> <p style="text-indent: 21.75pt; margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体">Q一Q?/span><font face="Times New Roman">3GPP</font><span style="font-family: 宋体">标准中的</span><span style="font-family: 宋体">协议?/span></p> <p style="text-indent: 21.75pt; margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体">主要包括以下几种Q?/span></p> <p style="text-indent: 21.75pt; margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体">·</span><font face="Times New Roman">RTP</font><span style="font-family: 宋体">Q实时传输协议)Q?/span><font face="Times New Roman">RTP</font><span style="font-family: 宋体">被定义ؓ(f)在一对一或一对多的传输情况下工作Q其目的是提供时间信息和实现同步,例如Q音频、视频或模拟数据?/span><font face="Times New Roman">RTP</font><span style="font-family: 宋体">不处理资源预定,q且不保证实时服务的服务质量Q通常使用</span><font face="Times New Roman">UDP</font><span style="font-family: 宋体">来传送数据?/span></p> <p style="text-indent: 21.75pt; margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体">·</span><font face="Times New Roman">RTCP</font><span style="font-family: 宋体">Q实时控制协议)Q?/span><font face="Times New Roman">RTCP</font><span style="font-family: 宋体">的主要功能是为数据的传送情冉|供反馈。接收端定期报告信息发送给发送端Q报告信息包括:(x)接收端测量到传输q程中的不稳定情况和信息包丢q数量Q?/span></p> <p style="text-indent: 21.75pt; margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体">·</span><font face="Times New Roman">RTSP</font><span style="font-family: 宋体">Q实时流协议Q:(x)</span><font face="Times New Roman">RTSP</font><span style="font-family: 宋体">被用于徏立和控制q箋媒体的时间同步流。它为多媒体服务扮演“|络q程控制”的角艌Ӏ?/span><font face="Times New Roman">RTSP</font><span style="font-family: 宋体">是文本协议ƈ且类?/span><font face="Times New Roman">HTTP</font><span style="font-family: 宋体">Q其主要不同之处在于</span><font face="Times New Roman">RTSP</font><span style="font-family: 宋体">是标准的媒体协议,q常利用独立传输协议Q通常?/span><font face="Times New Roman">RTP</font><span style="font-family: 宋体">Q来传输媒体数据?/span></p> <p style="text-indent: 21.75pt; margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体">·</span><font face="Times New Roman">SDP</font><span style="font-family: 宋体">Q会(x)话描q协议)Q?/span><span style="font-family: 宋体; font-size: 12pt">SDP</span><span style="font-family: 宋体">是服务器端生成的描述媒体文g的编码信息以?qing)所在的服务器的链接{信息,客户端通过它来配置播放软g的设|。它是一个简单、可扩展语法的文本协议?/span></p> <p style="text-indent: 21.75pt; margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体">所有这些流媒体相关?/span><span style="font-family: 宋体">议都是利?/span><font face="Times New Roman">TCP</font><span style="font-family: 宋体">?/span><font face="Times New Roman">UDP</font><span style="font-family: 宋体">传送。其中,</span><font face="Times New Roman">RTSP</font><span style="font-family: 宋体">是主要的协议Q在体系l构上位?/span><font face="Times New Roman">RTP</font><span style="font-family: 宋体">?/span><font face="Times New Roman">RTCP</font><span style="font-family: 宋体">之上Q属于应用层协议Q被用于建立和控制连l媒体的旉同步。它为多媒体服务扮演“|络q程控制”的角艌Ӏ?/span></p> <p style="text-indent: 21.75pt; margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体">Q二Q?/span><font face="Times New Roman">RTSP</font><span style="font-family: 宋体">单播操作的过E描q?/span></p> <p style="text-indent: 21.75pt; margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体">一ơ基本的</span><font face="Times New Roman">RTSP</font><span style="font-family: 宋体">单播操作Q其实就是用h放一个流媒体节目的过E。首先,客户端通过览一个带</span><font face="Times New Roman">RTSP URL</font><span style="font-family: 宋体">地址的网늭Ҏ(gu)来获得媒体片D늚位置。在媒体会(x)话初始化的时候,媒体播攑֙q接到流服务器ƈ发送一?/span><font face="Times New Roman">RTSP</font><span style="font-family: 宋体">描述命o(h)。这?#8220;描述命o(h)”包括了客L(fng)可以发送的cM音频信道的数量、支持的媒体cd、屏q尺寸大和q_象素{信息。流服务器通过一?/span><font face="Times New Roman">SDP</font><span style="font-family: 宋体">描述来进行反馈,反馈信息包括数量、媒体类型和h带宽。在分析完该描述之后Q客L(fng)Z(x)话中的每一个流发送一?/span><font face="Times New Roman">RTSP</font><span style="font-family: 宋体">安装命o(h)Q安装命令告诉服务器在客L(fng)用于接收媒体数据的端口。流媒体q接建立完成后,客户端发送一个播攑֑令,服务器就开始在</span><font face="Times New Roman">UDP</font><span style="font-family: 宋体">上传送媒体流Q?/span><font face="Times New Roman">RTP</font><span style="font-family: 宋体">包)到客L(fng)。最后,客户端可发送一个终止命令来l束媒体会(x)话?/span></p> <p style="text-indent: 21.75pt; margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体">Q三Q用户从手机上看到的程</span></p> <p style="text-indent: 21.75pt; margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体">上述</span><font face="Times New Roman">RTSP</font><span style="font-family: 宋体">操作q程对用h透明的。用户从手机上看到的只是Q当他通过</span><font face="Times New Roman">WAP</font><span style="font-family: 宋体">|站选择播放一个节目后Q手机操作系l自动启动了已安装的播放器,播放器通过</span><font face="Times New Roman">GPRS</font><span style="font-family: 宋体">|络q接到媒体服务器Qƈ开始缓Ԍ他只需在缓冲到</span><font face="Times New Roman">100%</font><span style="font-family: 宋体">前的M时刻点击“播放”按钮Q或{待~冲?/span><font face="Times New Roman">100%</font><span style="font-family: 宋体">时播攑֙自动播放Q就可以开始欣赏音视频节目?/span></p> <p style="text-indent: 21.75pt; margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Times New Roman"> </font></p> <p style="text-indent: 21.75pt; margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体">Ud媒体技术的应用开创了无线通信|络与互联网、视音频压羃~码技术相融合的新时代Q随着手机?/span><font face="Times New Roman">PDA</font><span style="font-family: 宋体">{移动终端品功能的不断提升Q移动流媒体技术必带lh们更多、更好的韌频体验?/span></p> <p style="text-indent: 21.75pt; margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体">(此文完成?006q??</span></p> <img src ="http://www.aygfsteel.com/TiGERTiAN/aggbug/316693.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/TiGERTiAN/" target="_blank">TiGERTiAN</a> 2010-03-27 15:11 <a href="http://www.aygfsteel.com/TiGERTiAN/archive/2010/03/27/316693.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Windows Mobile操作蓝牙打印?/title><link>http://www.aygfsteel.com/TiGERTiAN/archive/2010/03/23/316367.html</link><dc:creator>TiGERTiAN</dc:creator><author>TiGERTiAN</author><pubDate>Tue, 23 Mar 2010 13:47:00 GMT</pubDate><guid>http://www.aygfsteel.com/TiGERTiAN/archive/2010/03/23/316367.html</guid><wfw:comment>http://www.aygfsteel.com/TiGERTiAN/comments/316367.html</wfw:comment><comments>http://www.aygfsteel.com/TiGERTiAN/archive/2010/03/23/316367.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/TiGERTiAN/comments/commentRss/316367.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/TiGERTiAN/services/trackbacks/316367.html</trackback:ping><description><![CDATA[<span style="color: #0000ff">using</span><span style="color: #000000"> System;<br /> </span><span style="color: #0000ff">using</span><span style="color: #000000"> System.Collections.Generic;<br /> </span><span style="color: #0000ff">using</span><span style="color: #000000"> System.Text;<br /> </span><span style="color: #0000ff">using</span><span style="color: #000000"> System.IO;<br /> </span><span style="color: #0000ff">using</span><span style="color: #000000"> System.IO.Ports;<br /> <br /> </span><span style="color: #0000ff">namespace</span><span style="color: #000000"> BluetoothTest<br /> {<br />     </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">class</span><span style="color: #000000"> Printer<br />     {<br />         SerialPort server </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> SerialPort();<br />         </span><span style="color: #0000ff">private</span><span style="color: #000000"> </span><span style="color: #0000ff">string</span><span style="color: #000000"> _portName </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800000">"</span><span style="color: #800000">COM6</span><span style="color: #800000">"</span><span style="color: #000000">;</span><span style="color: #008000">//</span><span style="color: #008000">蓝牙一般默认ؓ(f)com6</span><span style="color: #008000"><br /> </span><span style="color: #000000"><br /> <br />         </span><span style="color: #808080">///</span><span style="color: #008000"> </span><span style="color: #808080"><summary></span><span style="color: #008000"><br />         </span><span style="color: #808080">///</span><span style="color: #008000"> 获取或设|端口名U?br />         </span><span style="color: #808080">///</span><span style="color: #008000"> </span><span style="color: #808080"></summary></span><span style="color: #808080"><br /> </span><span style="color: #000000">        </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">string</span><span style="color: #000000"> PortName<br />         {<br />             </span><span style="color: #0000ff">get</span><span style="color: #000000"> <br />             {<br />                 _portName </span><span style="color: #000000">=</span><span style="color: #000000"> server.PortName;<br />                 </span><span style="color: #0000ff">return</span><span style="color: #000000"> _portName; <br />             }<br />             </span><span style="color: #0000ff">set</span><span style="color: #000000"> <br />             {<br />                 _portName </span><span style="color: #000000">=</span><span style="color: #000000"> value;<br />                 server.PortName </span><span style="color: #000000">=</span><span style="color: #000000"> _portName;<br />             }<br />         }<br />         </span><span style="color: #808080">///</span><span style="color: #008000"> </span><span style="color: #808080"><summary></span><span style="color: #008000"><br />         </span><span style="color: #808080">///</span><span style="color: #008000"> 端口是否已经打开<br />         </span><span style="color: #808080">///</span><span style="color: #008000"> </span><span style="color: #808080"></summary></span><span style="color: #808080"><br /> </span><span style="color: #000000">        </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">bool</span><span style="color: #000000"> IsOpen<br />         {<br />             </span><span style="color: #0000ff">get</span><span style="color: #000000"> <br />             {<br />                 </span><span style="color: #0000ff">return</span><span style="color: #000000"> server.IsOpen;<br />             }<br />         }<br />         </span><span style="color: #808080">///</span><span style="color: #008000"> </span><span style="color: #808080"><summary></span><span style="color: #008000"><br />         </span><span style="color: #808080">///</span><span style="color: #008000"> 构造方法初始化串口参数<br />         </span><span style="color: #808080">///</span><span style="color: #008000"> </span><span style="color: #808080"></summary></span><span style="color: #808080"><br /> </span><span style="color: #000000">        </span><span style="color: #0000ff">public</span><span style="color: #000000"> Printer()<br />         {</span><span style="color: #008000">//</span><span style="color: #008000">初始化各个参?/span><span style="color: #008000"><br /> </span><span style="color: #000000">            server.BaudRate </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800080">9600</span><span style="color: #000000">;</span><span style="color: #008000">//</span><span style="color: #008000">波特?/span><span style="color: #008000"><br /> </span><span style="color: #000000">            server.Parity </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800080">0</span><span style="color: #000000">;</span><span style="color: #008000">//</span><span style="color: #008000">校检?/span><span style="color: #008000"><br /> </span><span style="color: #000000">            server.DataBits </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800080">8</span><span style="color: #000000">;</span><span style="color: #008000">//</span><span style="color: #008000">数据?/span><span style="color: #008000"><br /> </span><span style="color: #000000">            server.StopBits </span><span style="color: #000000">=</span><span style="color: #000000"> StopBits.One;</span><span style="color: #008000">//</span><span style="color: #008000">停止?/span><span style="color: #008000"><br /> </span><span style="color: #000000">            server.PortName </span><span style="color: #000000">=</span><span style="color: #000000"> _portName;</span><span style="color: #008000">//</span><span style="color: #008000">端口名称</span><span style="color: #008000"><br /> </span><span style="color: #000000">            server.WriteTimeout </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">-</span><span style="color: #800080">1</span><span style="color: #000000">;</span><span style="color: #008000">//</span><span style="color: #008000">时旉</span><span style="color: #008000"><br /> </span><span style="color: #000000">            server.ReadTimeout </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">-</span><span style="color: #800080">1</span><span style="color: #000000">;</span><span style="color: #008000">//</span><span style="color: #008000">时旉</span><span style="color: #008000"><br /> </span><span style="color: #000000">        }<br />         </span><span style="color: #808080">///</span><span style="color: #008000"> </span><span style="color: #808080"><summary></span><span style="color: #008000"><br />         </span><span style="color: #808080">///</span><span style="color: #008000"> 打开端口<br />         </span><span style="color: #808080">///</span><span style="color: #008000"> </span><span style="color: #808080"></summary></span><span style="color: #008000"><br />         </span><span style="color: #808080">///</span><span style="color: #008000"> </span><span style="color: #808080"><returns></returns></span><span style="color: #808080"><br /> </span><span style="color: #000000">        </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">bool</span><span style="color: #000000"> OpenPort()<br />         {<br />             </span><span style="color: #0000ff">try</span><span style="color: #000000"><br />             {<br />                 </span><span style="color: #0000ff">if</span><span style="color: #000000"> (</span><span style="color: #000000">!</span><span style="color: #000000">server.IsOpen)<br />                 {</span><span style="color: #008000">//</span><span style="color: #008000">关闭?/span><span style="color: #008000"><br /> </span><span style="color: #000000">                    server.Open();<br />                 }<br />                 </span><span style="color: #0000ff">else</span><span style="color: #000000"><br />                 {</span><span style="color: #008000">//</span><span style="color: #008000">打开?br />                     </span><span style="color: #008000">//</span><span style="color: #008000">server.Close();<br />                     </span><span style="color: #008000">//</span><span style="color: #008000">server.Open();</span><span style="color: #008000"><br /> </span><span style="color: #000000">                }<br />                 </span><span style="color: #0000ff">return</span><span style="color: #000000"> </span><span style="color: #0000ff">true</span><span style="color: #000000">;<br />             }<br />             </span><span style="color: #0000ff">catch</span><span style="color: #000000">(Exception ex)<br />             { </span><span style="color: #0000ff">return</span><span style="color: #000000"> </span><span style="color: #0000ff">false</span><span style="color: #000000">; }<br />         }<br />         </span><span style="color: #808080">///</span><span style="color: #008000"> </span><span style="color: #808080"><summary></span><span style="color: #008000"><br />         </span><span style="color: #808080">///</span><span style="color: #008000"> 发送数?br />         </span><span style="color: #808080">///</span><span style="color: #008000"> </span><span style="color: #808080"></summary></span><span style="color: #008000"><br />         </span><span style="color: #808080">///</span><span style="color: #008000"> </span><span style="color: #808080"><param name="str"></param></span><span style="color: #008000"><br />         </span><span style="color: #808080">///</span><span style="color: #008000"> </span><span style="color: #808080"><returns></returns></span><span style="color: #808080"><br /> </span><span style="color: #000000">        </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">bool</span><span style="color: #000000"> SendDataToPort(</span><span style="color: #0000ff">string</span><span style="color: #000000"> str,</span><span style="color: #0000ff">out</span><span style="color: #000000"> </span><span style="color: #0000ff">string</span><span style="color: #000000"> mes)<br />         {<br />             </span><span style="color: #0000ff">try</span><span style="color: #000000"><br />             {<br />                 </span><span style="color: #0000ff">byte</span><span style="color: #000000">[] OutBuffer;</span><span style="color: #008000">//</span><span style="color: #008000">数据</span><span style="color: #008000"><br /> </span><span style="color: #000000"><br />                 </span><span style="color: #0000ff">int</span><span style="color: #000000"> BufferSize;<br />                 Encoding targetEncoding;<br /> <br />                 <br /> <br /> <br /> <br />                 </span><span style="color: #008000">//</span><span style="color: #008000">[UNICODE~码]转换为[GB码]Q仅使用于简体中文版mobile</span><span style="color: #008000"><br /> </span><span style="color: #000000">                targetEncoding </span><span style="color: #000000">=</span><span style="color: #000000"> Encoding.GetEncoding(</span><span style="color: #800080">0</span><span style="color: #000000">);    </span><span style="color: #008000">//</span><span style="color: #008000">得到体中文字码页的编码方式,因ؓ(f)是简体中文操作系l,参数?可以,?36也行?/span><span style="color: #008000"><br /> </span><span style="color: #000000">                BufferSize </span><span style="color: #000000">=</span><span style="color: #000000"> targetEncoding.GetByteCount(str); </span><span style="color: #008000">//</span><span style="color: #008000">计算Ҏ(gu)定字W数l中的所有字W进行编码所产生的字节数           </span><span style="color: #008000"><br /> </span><span style="color: #000000">                OutBuffer </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> </span><span style="color: #0000ff">byte</span><span style="color: #000000">[BufferSize];<br />                 OutBuffer </span><span style="color: #000000">=</span><span style="color: #000000"> targetEncoding.GetBytes(str);       </span><span style="color: #008000">//</span><span style="color: #008000">指定字W数l中的所有字W编码ؓ(f)一个字节序?完成后outbufer里面即ؓ(f)体中文编?/span><span style="color: #008000"><br /> </span><span style="color: #000000"><br />                 </span><span style="color: #0000ff">byte</span><span style="color: #000000">[] cmdData </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> </span><span style="color: #0000ff">byte</span><span style="color: #000000">[BufferSize</span><span style="color: #000000">+</span><span style="color: #800080">100</span><span style="color: #000000">];<br /> <br />                 </span><span style="color: #008000">//</span><span style="color: #008000">初始化打印机</span><span style="color: #008000"><br /> </span><span style="color: #000000">                cmdData[</span><span style="color: #800080">0</span><span style="color: #000000">] </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800080">0x1B</span><span style="color: #000000">;<br />                 cmdData[</span><span style="color: #800080">1</span><span style="color: #000000">] </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800080">0x40</span><span style="color: #000000">;<br />                 </span><span style="color: #008000">//</span><span style="color: #008000">讄字符时旋{180?/span><span style="color: #008000"><br /> </span><span style="color: #000000">                cmdData[</span><span style="color: #800080">2</span><span style="color: #000000">] </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800080">0x1B</span><span style="color: #000000">;<br />                 cmdData[</span><span style="color: #800080">3</span><span style="color: #000000">] </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800080">0x56</span><span style="color: #000000">;<br />                 cmdData[</span><span style="color: #800080">4</span><span style="color: #000000">] </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800080">0</span><span style="color: #000000">;<br /> <br /> <br />                 </span><span style="color: #0000ff">for</span><span style="color: #000000"> (</span><span style="color: #0000ff">int</span><span style="color: #000000"> i </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800080">0</span><span style="color: #000000">; i </span><span style="color: #000000"><</span><span style="color: #000000"> BufferSize; i</span><span style="color: #000000">++</span><span style="color: #000000">)<br />                 {<br />                     cmdData[</span><span style="color: #800080">5</span><span style="color: #000000"> </span><span style="color: #000000">+</span><span style="color: #000000"> i] </span><span style="color: #000000">=</span><span style="color: #000000"> OutBuffer[i];<br />                 }<br /> <br /> <br />                 </span><span style="color: #008000">//</span><span style="color: #008000">向打印机发送[GB码]数据</span><span style="color: #008000"><br /> </span><span style="color: #000000">                server.Write(cmdData, </span><span style="color: #800080">0</span><span style="color: #000000">, BufferSize </span><span style="color: #000000">+</span><span style="color: #000000"> </span><span style="color: #800080">5</span><span style="color: #000000">);<br />                 </span><span style="color: #008000">//</span><span style="color: #008000">server.WriteLine(str);<br /> <br />                 </span><span style="color: #008000">//</span><span style="color: #008000">初始化指?B 40</span><span style="color: #008000"><br /> </span><span style="color: #000000">                cmdData[</span><span style="color: #800080">0</span><span style="color: #000000">] </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800080">0x1B</span><span style="color: #000000">;<br />                 cmdData[</span><span style="color: #800080">1</span><span style="color: #000000">] </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800080">0x40</span><span style="color: #000000">;<br />                 </span><span style="color: #008000">//</span><span style="color: #008000">打印q走U指?/span><span style="color: #008000"><br /> </span><span style="color: #000000">                cmdData[</span><span style="color: #800080">2</span><span style="color: #000000">] </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800080">0x1B</span><span style="color: #000000">;<br />                 cmdData[</span><span style="color: #800080">3</span><span style="color: #000000">] </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800080">0x64</span><span style="color: #000000">;<br />                 cmdData[</span><span style="color: #800080">4</span><span style="color: #000000">] </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800080">0x02</span><span style="color: #000000">;<br /> <br />                 server.Write(cmdData, </span><span style="color: #800080">0</span><span style="color: #000000">, </span><span style="color: #800080">5</span><span style="color: #000000">);<br />                 mes </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800000">""</span><span style="color: #000000">;<br />                 </span><span style="color: #0000ff">return</span><span style="color: #000000"> </span><span style="color: #0000ff">true</span><span style="color: #000000">;<br />             }<br />             </span><span style="color: #0000ff">catch</span><span style="color: #000000">(Exception ex)<br />             {<br />                 mes </span><span style="color: #000000">=</span><span style="color: #000000"> ex.Message;<br />                 </span><span style="color: #0000ff">return</span><span style="color: #000000"> </span><span style="color: #0000ff">false</span><span style="color: #000000">;<br />             }<br />         }<br />         </span><span style="color: #808080">///</span><span style="color: #008000"> </span><span style="color: #808080"><summary></span><span style="color: #008000"><br />         </span><span style="color: #808080">///</span><span style="color: #008000"> 十六q制转换字节数组<br />         </span><span style="color: #808080">///</span><span style="color: #008000"> </span><span style="color: #808080"></summary></span><span style="color: #008000"><br />         </span><span style="color: #808080">///</span><span style="color: #008000"> </span><span style="color: #808080"><param name="s"></param></span><span style="color: #008000"><br />         </span><span style="color: #808080">///</span><span style="color: #008000"> </span><span style="color: #808080"><returns></returns></span><span style="color: #808080"><br /> </span><span style="color: #000000">        </span><span style="color: #0000ff">private</span><span style="color: #000000"> </span><span style="color: #0000ff">byte</span><span style="color: #000000">[] HexStringToByteArray(</span><span style="color: #0000ff">string</span><span style="color: #000000"> s)<br />         {<br />             s </span><span style="color: #000000">=</span><span style="color: #000000"> s.Replace(</span><span style="color: #800000">"</span><span style="color: #800000"> </span><span style="color: #800000">"</span><span style="color: #000000">, </span><span style="color: #800000">""</span><span style="color: #000000">);<br />             </span><span style="color: #0000ff">byte</span><span style="color: #000000">[] buffer </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> </span><span style="color: #0000ff">byte</span><span style="color: #000000">[s.Length </span><span style="color: #000000">/</span><span style="color: #000000"> </span><span style="color: #800080">2</span><span style="color: #000000">];<br />             </span><span style="color: #0000ff">for</span><span style="color: #000000"> (</span><span style="color: #0000ff">int</span><span style="color: #000000"> i </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800080">0</span><span style="color: #000000">; i </span><span style="color: #000000"><</span><span style="color: #000000"> s.Length; i </span><span style="color: #000000">+=</span><span style="color: #000000"> </span><span style="color: #800080">2</span><span style="color: #000000">)<br />                 buffer[i </span><span style="color: #000000">/</span><span style="color: #000000"> </span><span style="color: #800080">2</span><span style="color: #000000">] </span><span style="color: #000000">=</span><span style="color: #000000"> (</span><span style="color: #0000ff">byte</span><span style="color: #000000">)Convert.ToByte(s.Substring(i, </span><span style="color: #800080">2</span><span style="color: #000000">), </span><span style="color: #800080">16</span><span style="color: #000000">);<br />             </span><span style="color: #0000ff">return</span><span style="color: #000000"> buffer;<br />         }<br />         </span><span style="color: #808080">///</span><span style="color: #008000"> </span><span style="color: #808080"><summary></span><span style="color: #008000"><br />         </span><span style="color: #808080">///</span><span style="color: #008000"> 字节数组转换十六q制<br />         </span><span style="color: #808080">///</span><span style="color: #008000"> </span><span style="color: #808080"></summary></span><span style="color: #008000"><br />         </span><span style="color: #808080">///</span><span style="color: #008000"> </span><span style="color: #808080"><param name="data"></param></span><span style="color: #008000"><br />         </span><span style="color: #808080">///</span><span style="color: #008000"> </span><span style="color: #808080"><returns></returns></span><span style="color: #808080"><br /> </span><span style="color: #000000">        </span><span style="color: #0000ff">private</span><span style="color: #000000"> </span><span style="color: #0000ff">string</span><span style="color: #000000"> ByteArrayToHexString(</span><span style="color: #0000ff">byte</span><span style="color: #000000">[] data)<br />         {<br />             StringBuilder sb </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> StringBuilder(data.Length </span><span style="color: #000000">*</span><span style="color: #000000"> </span><span style="color: #800080">3</span><span style="color: #000000">);<br />             </span><span style="color: #0000ff">foreach</span><span style="color: #000000"> (</span><span style="color: #0000ff">byte</span><span style="color: #000000"> b </span><span style="color: #0000ff">in</span><span style="color: #000000"> data)<br />                 sb.Append(Convert.ToString(b, </span><span style="color: #800080">16</span><span style="color: #000000">).PadLeft(</span><span style="color: #800080">2</span><span style="color: #000000">, </span><span style="color: #800000">'</span><span style="color: #800000">0</span><span style="color: #800000">'</span><span style="color: #000000">).PadRight(</span><span style="color: #800080">3</span><span style="color: #000000">, </span><span style="color: #800000">'</span><span style="color: #800000"> </span><span style="color: #800000">'</span><span style="color: #000000">));<br />             </span><span style="color: #0000ff">return</span><span style="color: #000000"> sb.ToString().ToUpper();<br />         }<br /> <br />         </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> ClosePort()<br />         {<br />             server.Close();            <br />         }<br />         <br />     }<br /> }<br /> </span> <p> </p> <p>3.接下在项目窗体上的用,看看下面的代码:(x)</p> <p> </p> <div id="wmqeeuq" class="cnblogs_code"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #0000ff">using</span><span style="color: #000000"> System;<br /> </span><span style="color: #0000ff">using</span><span style="color: #000000"> System.Collections.Generic;<br /> </span><span style="color: #0000ff">using</span><span style="color: #000000"> System.ComponentModel;<br /> </span><span style="color: #0000ff">using</span><span style="color: #000000"> System.Data;<br /> </span><span style="color: #0000ff">using</span><span style="color: #000000"> System.Drawing;<br /> </span><span style="color: #0000ff">using</span><span style="color: #000000"> System.Text;<br /> </span><span style="color: #0000ff">using</span><span style="color: #000000"> System.Windows.Forms;<br /> <br /> </span><span style="color: #0000ff">namespace</span><span style="color: #000000"> BluetoothTest<br /> {<br />     </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">partial</span><span style="color: #000000"> </span><span style="color: #0000ff">class</span><span style="color: #000000"> frmMain : Form<br />     {<br />         </span><span style="color: #0000ff">public</span><span style="color: #000000"> frmMain()<br />         {<br />             InitializeComponent();<br />         }<br />         Printer printer </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> Printer();<br />         </span><span style="color: #0000ff">private</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> menuItem4_Click(</span><span style="color: #0000ff">object</span><span style="color: #000000"> sender, EventArgs e)<br />         {<br />             </span><span style="color: #008000">//</span><span style="color: #008000">退?/span><span style="color: #008000"><br /> </span><span style="color: #000000">            printer.ClosePort();<br />             Application.Exit();<br />         }<br /> <br />         </span><span style="color: #0000ff">private</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> menuItem2_Click(</span><span style="color: #0000ff">object</span><span style="color: #000000"> sender, EventArgs e)<br />         {<br />             </span><span style="color: #008000">//</span><span style="color: #008000">打印</span><span style="color: #008000"><br /> </span><span style="color: #000000">            </span><span style="color: #0000ff">if</span><span style="color: #000000"> (tbxBody.Text.Length </span><span style="color: #000000">==</span><span style="color: #000000"> </span><span style="color: #800080">0</span><span style="color: #000000">)<br />                 </span><span style="color: #0000ff">return</span><span style="color: #000000">;<br /> <br />             setEnabled(</span><span style="color: #0000ff">false</span><span style="color: #000000">);<br />             </span><span style="color: #0000ff">if</span><span style="color: #000000"> (</span><span style="color: #000000">!</span><span style="color: #000000">printer.IsOpen)</span><span style="color: #008000">//</span><span style="color: #008000">只有在端口关闭的时候才能设|?/span><span style="color: #008000"><br /> </span><span style="color: #000000">                printer.PortName </span><span style="color: #000000">=</span><span style="color: #000000"> drpPort.GetItemText(drpPort.SelectedItem);<br />             </span><span style="color: #0000ff">if</span><span style="color: #000000"> (</span><span style="color: #000000">!</span><span style="color: #000000">printer.OpenPort())<br />             {<br />                 MessageBox.Show(</span><span style="color: #800000">"</span><span style="color: #800000">无法打开端口</span><span style="color: #800000">"</span><span style="color: #000000"> </span><span style="color: #000000">+</span><span style="color: #000000"> drpPort.GetItemText(drpPort.SelectedItem)); <br />             }<br />             </span><span style="color: #0000ff">string</span><span style="color: #000000"> mes </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800000">""</span><span style="color: #000000">;<br />             </span><span style="color: #0000ff">if</span><span style="color: #000000"> (</span><span style="color: #000000">!</span><span style="color: #000000">printer.SendDataToPort(tbxBody.Text,</span><span style="color: #0000ff">out</span><span style="color: #000000"> mes))<br />             {<br />                 MessageBox.Show(</span><span style="color: #800000">"</span><span style="color: #800000">发送数据失?/span><span style="color: #800000">"</span><span style="color: #000000"> </span><span style="color: #000000">+</span><span style="color: #000000"> drpPort.GetItemText(drpPort.SelectedItem) </span><span style="color: #000000">+</span><span style="color: #000000"> </span><span style="color: #800000">"</span><span style="color: #800000">  </span><span style="color: #800000">"</span><span style="color: #000000"> </span><span style="color: #000000">+</span><span style="color: #000000"> mes); <br />             }<br />             <br />             setEnabled(</span><span style="color: #0000ff">true</span><span style="color: #000000">);<br />             <br />         }<br />         </span><span style="color: #0000ff">private</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> setEnabled(</span><span style="color: #0000ff">bool</span><span style="color: #000000"> b)<br />         {<br />             menuItem1.Enabled </span><span style="color: #000000">=</span><span style="color: #000000"> b;<br />             menuItem3.Enabled </span><span style="color: #000000">=</span><span style="color: #000000"> b;<br />         }<br />         </span><span style="color: #0000ff">private</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> frmMain_Load(</span><span style="color: #0000ff">object</span><span style="color: #000000"> sender, EventArgs e)<br />         {<br />             </span><span style="color: #008000">//</span><span style="color: #008000">初始?/span><span style="color: #008000"><br /> </span><span style="color: #000000">            drpPort.SelectedIndex </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #800080">1</span><span style="color: #000000">;<br />         }<br />     }<br /> }</span></div> <img src ="http://www.aygfsteel.com/TiGERTiAN/aggbug/316367.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/TiGERTiAN/" target="_blank">TiGERTiAN</a> 2010-03-23 21:47 <a href="http://www.aygfsteel.com/TiGERTiAN/archive/2010/03/23/316367.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>多普?Dopod) S900C GPSL问题的解军_?/title><link>http://www.aygfsteel.com/TiGERTiAN/archive/2009/11/02/300701.html</link><dc:creator>TiGERTiAN</dc:creator><author>TiGERTiAN</author><pubDate>Mon, 02 Nov 2009 06:54:00 GMT</pubDate><guid>http://www.aygfsteel.com/TiGERTiAN/archive/2009/11/02/300701.html</guid><wfw:comment>http://www.aygfsteel.com/TiGERTiAN/comments/300701.html</wfw:comment><comments>http://www.aygfsteel.com/TiGERTiAN/archive/2009/11/02/300701.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.aygfsteel.com/TiGERTiAN/comments/commentRss/300701.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/TiGERTiAN/services/trackbacks/300701.html</trackback:ping><description><![CDATA[<a href="/Files/TiGERTiAN/GPS_Problem.rar">/Files/TiGERTiAN/GPS_Problem.rar</a><br /> <br /> 解决办法和相x件请下蝲上面的压~文Ӟq次GPSL问题Q主要是因ؓ(f)更新的星图数据让GPS起了一些冲H,解决办法是Q用旧的数据文gL换新的,临时用下Q等待官方的解决办法?br /> <br /> 附S900C的硬启和三色屏的Ҏ(gu)Q?br /> <strong><font color="#0000ff"><span id="wmqeeuq" class="t_tag" onclick="tagshow(event)" href="tag.php?name=%D3%B2%C6%F4">启</span>Ҏ(gu)Q?/font></strong><span id="wmqeeuq" class="t_tag" onclick="tagshow(event)" href="tag.php?name=%CA%D6%BB%FA">手机</span>xQ同时按住确认键+音量减键Q再按住甉|键开机,出现启界面后松开所有按键,然后按音量加键,清除记忆体,再按音量加键重新启动?font style="font-size: 0px; color: #fff">1 M' l* n3 Q# K% q0 T</font><br /> <strong><font color="#0000ff"><strong>q三?/strong>屏方法:(x)</font></strong>手机xQ同时按住电(sh)源键+音量减键Q等到出C色屏后松开所有按键。再用USBU连接到<span id="wmqeeuq" class="t_tag" onclick="tagshow(event)" href="tag.php?name=%B5%E7%C4%D4">?sh)?/span>Q打开<span id="wmqeeuq" class="t_tag" onclick="tagshow(event)" href="tag.php?name=ROM">ROM</span>所?span class="t_tag" onclick="tagshow(event)" href="tag.php?name=%CE%C4%BC%FE">文g</span>夹,q行<span id="wmqeeuq" class="t_tag" onclick="tagshow(event)" href="tag.php?name=Diamond">Diamond</span> Unlocker.exeQ然后按提示q行操作Q等?span class="t_tag" onclick="tagshow(event)" href="tag.php?name=%CB%A2%BB%FA">h</span>完成p了。刷机前和后最好都启一ơ,可以有效减少出错情况?font style="font-size: 0px; color: #fff">/ @+ s; </font> <img src ="http://www.aygfsteel.com/TiGERTiAN/aggbug/300701.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/TiGERTiAN/" target="_blank">TiGERTiAN</a> 2009-11-02 14:54 <a href="http://www.aygfsteel.com/TiGERTiAN/archive/2009/11/02/300701.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>3G开发移动应用开发需要注意的一些东?Windows Mobile)http://www.aygfsteel.com/TiGERTiAN/archive/2009/09/19/295654.htmlTiGERTiANTiGERTiANSat, 19 Sep 2009 03:19:00 GMThttp://www.aygfsteel.com/TiGERTiAN/archive/2009/09/19/295654.htmlhttp://www.aygfsteel.com/TiGERTiAN/comments/295654.htmlhttp://www.aygfsteel.com/TiGERTiAN/archive/2009/09/19/295654.html#Feedback1http://www.aygfsteel.com/TiGERTiAN/comments/commentRss/295654.htmlhttp://www.aygfsteel.com/TiGERTiAN/services/trackbacks/295654.html  阅读全文

TiGERTiAN 2009-09-19 11:19 发表评论
]]>
最q做的一个政府项目的ȝhttp://www.aygfsteel.com/TiGERTiAN/archive/2009/08/15/291226.htmlTiGERTiANTiGERTiANSat, 15 Aug 2009 01:12:00 GMThttp://www.aygfsteel.com/TiGERTiAN/archive/2009/08/15/291226.htmlhttp://www.aygfsteel.com/TiGERTiAN/comments/291226.htmlhttp://www.aygfsteel.com/TiGERTiAN/archive/2009/08/15/291226.html#Feedback2http://www.aygfsteel.com/TiGERTiAN/comments/commentRss/291226.htmlhttp://www.aygfsteel.com/TiGERTiAN/services/trackbacks/291226.html
N个月前,某国家直属单位的Ud办公目开始立和内部调研QƈL了几家候选单位?br />
两个半月前,通知候选单位,竞标准备开始了Q我的加班日子也随之启动了,q箋半个月么的一天休息的Q因为终端开发是我一个h做?br />
两个月前的某一天,竞标大会(x)召开了,4家单位,最后只M三家Q一家很有竞争力的单位因为太忙了Q抽不出人手而放弃,我们感到很庆q,因ؓ(f)如果他们参加的话Q我们成功率?x)直接降一半。竞标过E让我感觉到政府单位q是比较公开透明的(因ؓ(f)他们的关pL不是做这块的Q,因ؓ(f)是移动项目,所以他们对E_性,操作便捷性还有传输稳定性都q行了测试和评审Q稳定性就不用说了QDemo中的每个功能都要完完全全操作一遍的Q操作的便捷性也随之体现出来Q传输稳定性的试Q他们用C屏蔽仪,把移动信号全部屏蔽掉q行传输数据试Q要求就没有信号也不能q扰用户的输入,传输全部丢入后台。因为成功的演示以及(qing)之前的项目,自然我们也就中标了,本以Z个月的项目周期,可以舒服点了Q可没想刎ͼ我的理解错误了。。。。三个月是完全交付用的周期Q不是开发周期。。。。。?br />
6月开始天天加班,q箋一个月没有休息q,六月底拿Z1.0.0Q测试修改出?.0.1Q之后在试用前出了一?.0.3Q七月下旬开始试用。本周一接到d跟随信息办的Z起去q行试用反馈调研Q听取意见进行进一步完善?br />
q周出差了一周,调研发现的问题如下:(x)
1.主要修改的系l是我们Ҏ(gu)的那个主pȝQ他们内部的OAQ因为我们终端系l也是依附于他的Q所以他的灵zL用性直接媄(jing)响到我们的工作量Q欣慰的是他们的pȝ很灵z,所以终端程序在设计之初也就考虑C灉|性这点,使得他们q怎么修改Ҏ(gu)们的影响都很?br /> 2.l端主要问题都是要通过更新讑֤才能解决Q比如手写输入准性低Q需要用键盘;待机旉很短Q因Z用了3GQ所以正常待机才一天,使用只有半天Q这也是反应最多的一个问题?br /> 3.l端pȝq是要注意系l的速度Q以?qing)用的便捷性,便捷性主要是文字输入上面的便h,因ؓ(f)使用人员都不是我们专业开发所以他们操作很慢,要尽可能的简化他们的操作Q最主要的就是文字输入,炚w?其实倒不担心了。还有就是界面上面的控g要尽量舒服美观,最好只靠点选操作即可,q样增加使用者的体验性。传输这块是比较重要的,因ؓ(f)用户使用最?ch)的是操作被打断,所以能丢入后台传输的尽量丢入后収ͼq样用户既可以增加用h作的畅性也可以增加体验性?br /> 4.pȝ最后要在整个单位都要铺开使用Q而用h员工作范围也不同Q所以终端设备是要区分对待的Q经常在外的需要那U大屏幕带键盘的讑֤Q文职h员可以用现在正在试用的l端Q多普达的智能机Q方便携带用?br />





TiGERTiAN 2009-08-15 09:12 发表评论
]]>
【实用技巧】Windows Mobile 手机q接?sh)脑Ӟ如何使用GPRS上网Q同时跟?sh)脑保持q接?USB和GPRS共存问题)http://www.aygfsteel.com/TiGERTiAN/archive/2009/03/19/260906.htmlTiGERTiANTiGERTiANThu, 19 Mar 2009 14:08:00 GMThttp://www.aygfsteel.com/TiGERTiAN/archive/2009/03/19/260906.htmlhttp://www.aygfsteel.com/TiGERTiAN/comments/260906.htmlhttp://www.aygfsteel.com/TiGERTiAN/archive/2009/03/19/260906.html#Feedback0http://www.aygfsteel.com/TiGERTiAN/comments/commentRss/260906.htmlhttp://www.aygfsteel.com/TiGERTiAN/services/trackbacks/260906.html 步骤是:(x)
1、先安装PC上面的Pocket ControllerQ然后通过ActiveSync开启高U网l功能连接手机,然后Pocket Controller在连接时?x)自动提C给手机安装客户端?br /> 2、安装完之后Q在Pocket Controller中的讄里面Q徏立一个新的连接通过TCP/IP的。IP是169.254.2.1
3、确认手机开启了TCP/IPq接允许Q然后用Pocket Controller去连接手机。连接成功之后,掉ActiveSyncQ也是关闭q接讄里面?允许USBq接和允?dng)R过以下端口q接 两项?br /> 4、这h作之后Pocket Controller仍然与手Z持连接,而且手机也可以上GPRS或者Edge了?

TiGERTiAN 2009-03-19 22:08 发表评论
]]>
Windows Mobile开发的一些小技巧(持箋更新Q?/title><link>http://www.aygfsteel.com/TiGERTiAN/archive/2008/10/07/232898.html</link><dc:creator>TiGERTiAN</dc:creator><author>TiGERTiAN</author><pubDate>Tue, 07 Oct 2008 05:02:00 GMT</pubDate><guid>http://www.aygfsteel.com/TiGERTiAN/archive/2008/10/07/232898.html</guid><wfw:comment>http://www.aygfsteel.com/TiGERTiAN/comments/232898.html</wfw:comment><comments>http://www.aygfsteel.com/TiGERTiAN/archive/2008/10/07/232898.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/TiGERTiAN/comments/commentRss/232898.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/TiGERTiAN/services/trackbacks/232898.html</trackback:ping><description><![CDATA[<p><strong>1.如何真正的退出程序,而不是隐藏窗体?</strong><br /> Windows Mobile中当你点击X的时候,q不是真正的关闭H体Q而是隐藏H体Q需要在应用E序的每个Form中调用一个函数才可以?br /> </p> <div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: #eeeeee;"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: #000000;">        </span><span style="color: #0000ff;">private</span><span style="color: #000000;"> </span><span style="color: #0000ff;">void</span><span style="color: #000000;"> InfoMain_Closed(</span><span style="color: #0000ff;">object</span><span style="color: #000000;"> sender, EventArgs e)<br /> <img id="Codehighlighter1_73_115_Open_Image" onclick="this.style.display='none'; Codehighlighter1_73_115_Open_Text.style.display='none'; Codehighlighter1_73_115_Closed_Image.style.display='inline'; Codehighlighter1_73_115_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_73_115_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_73_115_Closed_Text.style.display='none'; Codehighlighter1_73_115_Open_Image.style.display='inline'; Codehighlighter1_73_115_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align="top" />        </span><span id="Codehighlighter1_73_115_Closed_Text" style="border: 1px solid #808080; display: none; background-color: #ffffff;"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_73_115_Open_Text"><span style="color: #000000;">{<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />            Application.Exit();<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />        }</span></span></div> <p><br /> 每个H体的Closed事g中加入Application.Exit();才能真正的退出程序?br /> <br /> <strong>2.如何让窗体跟着输入法窗口上U?/strong>Q?br /> 当输入文字时需要打开输入法,而当打开输入法的时候输入法?x)直接盖掉下层的E序界面Q导致有时候窗体下方的控g无法q行操作Q输入文字,点击按钮{)Q那么这个时候就需要我们在输入法状态变更的时候出发一些事Ӟ让输入法H口不要盖住E序?br /> 首先每次创徏FormQ最好都先添加一个panel做控件的上层容器Q设定好相对panel的位|,q样控g才会(x)Ҏ(gu)panel的变化而变化。之后给InputPanel的EnabledChanged事g加入下面的代码:(x)</p> <div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: #eeeeee;"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: #000000;">        </span><span style="color: #0000ff;">private</span><span style="color: #000000;"> </span><span style="color: #0000ff;">void</span><span style="color: #000000;"> inputPanel1_EnabledChanged(</span><span style="color: #0000ff;">object</span><span style="color: #000000;"> sender, EventArgs e)<br /> <img id="Codehighlighter1_84_378_Open_Image" onclick="this.style.display='none'; Codehighlighter1_84_378_Open_Text.style.display='none'; Codehighlighter1_84_378_Closed_Image.style.display='inline'; Codehighlighter1_84_378_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_84_378_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_84_378_Closed_Text.style.display='none'; Codehighlighter1_84_378_Open_Image.style.display='inline'; Codehighlighter1_84_378_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align="top" />        </span><span id="Codehighlighter1_84_378_Closed_Text" style="border: 1px solid #808080; display: none; background-color: #ffffff;"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_84_378_Open_Text"><span style="color: #000000;">{<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />            </span><span style="color: #0000ff;">if</span><span style="color: #000000;"> (inputPanel1.Enabled)<br /> <img id="Codehighlighter1_135_272_Open_Image" onclick="this.style.display='none'; Codehighlighter1_135_272_Open_Text.style.display='none'; Codehighlighter1_135_272_Closed_Image.style.display='inline'; Codehighlighter1_135_272_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_135_272_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_135_272_Closed_Text.style.display='none'; Codehighlighter1_135_272_Open_Image.style.display='inline'; Codehighlighter1_135_272_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />            </span><span id="Codehighlighter1_135_272_Closed_Text" style="border: 1px solid #808080; display: none; background-color: #ffffff;"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_135_272_Open_Text"><span style="color: #000000;">{<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                </span><span style="color: #0000ff;">this</span><span style="color: #000000;">.panel1.Dock </span><span style="color: #000000;">=</span><span style="color: #000000;"> DockStyle.None;<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                </span><span style="color: #0000ff;">this</span><span style="color: #000000;">.panel1.Height </span><span style="color: #000000;">=</span><span style="color: #000000;"> inputPanel1.VisibleDesktop.Height;<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />            }</span></span><span style="color: #000000;"><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />            </span><span style="color: #0000ff;">else</span><span style="color: #000000;"><br /> <img id="Codehighlighter1_303_368_Open_Image" onclick="this.style.display='none'; Codehighlighter1_303_368_Open_Text.style.display='none'; Codehighlighter1_303_368_Closed_Image.style.display='inline'; Codehighlighter1_303_368_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_303_368_Closed_Image" style="display: none;" onclick="this.style.display='none'; Codehighlighter1_303_368_Closed_Text.style.display='none'; Codehighlighter1_303_368_Open_Image.style.display='inline'; Codehighlighter1_303_368_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />            </span><span id="Codehighlighter1_303_368_Closed_Text" style="border: 1px solid #808080; display: none; background-color: #ffffff;"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_303_368_Open_Text"><span style="color: #000000;">{<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                </span><span style="color: #0000ff;">this</span><span style="color: #000000;">.panel1.Dock </span><span style="color: #000000;">=</span><span style="color: #000000;"> DockStyle.Fill;<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />            }</span></span><span style="color: #000000;"><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />        }</span></span></div> 当输入法打开的时候panel不再占据全屏Q而是跟除了输入法外的可视化范围一样高。输入法关闭Ӟpanel恢复占据全屏。当然panel的AutoScroll要设定ؓ(f)true?<br /> <br /> <strong>3.如何创徏非全屏Form?</strong><br /> 首先需要你创徏一个全屏的FormQ然后将以下参数讑֮为指定?br /> ControlBox = false;<br /> FormBorderStyle = none;<br /> MinimizeBox = false;<br /> WindowState = normal;<br /> Size = 讄Z惌的大即可?br /> <br /> q样的非全屏H体不带Ҏ(gu)不带标题Q只有一个光U秃的Form。如果你需要那些边框和标题使得界面更加观Q则可以参考以下文章:(x)<br /> http://www.christec.co.nz/blog/archives/134<br /> 牉|C一些对底层的操作?<br /> <br /> <strong>4.</strong><a class="titlelink" id="Editor_Results_rprSelectionList_ctl01_LinkTitle" href="http://www.aygfsteel.com/TiGERTiAN/archive/2009/03/19/260906.html"><strong>【实用技巧】Windows Mobile 手机q接?sh)脑Ӟ如何使用GPRS上网Q同时跟?sh)脑保持q接?USB和GPRS共存问题)</strong></a><strong> (3-19 22:08)</strong> <br /> <br /> <strong>5.如何提高Windows Mobile?Http上传文g的稳定性?</strong><br /> 其实上传文g最好还是用FTPQ因为比较稳定,各方面也很成熟。如果是和业务系l相关的一些东西,也不要紧Q客L(fng)上传完成之后h下服务端的一个服务,通知他业务数据上传完毕,然后服务端去做一些操作,之后可以回应l客L(fng)可以了?br /> 但如果非要用HTTP的话Q也不要紧,虽然无线|络用HTTP传输文g不是太稳定,但M上还是不错的Q只是你需要设计一套断点箋传机Ӟ来保证就网l发生异怺Q也可以接着上次的再传。除了用断点箋传机Ӟq有一个技巧,是让客L(fng)和服务端的连接超时时_(d)ConnectionTimeout)可能的长些Q比如设|ؓ(f)200U,q是在开发过E中ȝ出来的,我测试过很多ơ,发现如果时旉很长的话Q多数大文g(> 500kb)其实一ơ就可以传递上去,之前传不上去Q多数是因ؓ(f)q接时Q而服务端如果使用tomcatQ抛出Socket read timeout异常之后Q客L(fng)多数收不刎ͼ因ؓ(f)此时的客L(fng)q在朝Request中的Outputstream写数据,q没有走到request.GetResponse()q一步,q就造成了,客户端发送完数据之后才知道客L(fng)异常了,费了很多流量,也降低了很多效率Q大家可以注意一下?br /> <br /> 6.如何建立GPRSq接Q?br /> UdQ?br /> <div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: #000000;">XmlDocument configDoc </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000ff;">new</span><span style="color: #000000;"> XmlDocument();<br /> configDoc.LoadXml(<br />                         </span><span style="color: #000000;">"</span><span style="color: #000000;"><wap-provisioningdoc></span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"><br />                         </span><span style="color: #000000;">"</span><span style="color: #000000;"><characteristic type=\</span><span style="color: #000000;">"</span><span style="color: #000000;">CM_GPRSEntries\</span><span style="color: #000000;">"</span><span style="color: #000000;">></span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"><br />                         </span><span style="color: #000000;">"</span><span style="color: #000000;"><characteristic type=\</span><span style="color: #000000;">"</span><span style="color: #000000;">xxx\</span><span style="color: #000000;">"</span><span style="color: #000000;">></span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"><br />                         </span><span style="color: #000000;">"</span><span style="color: #000000;"><parm name=\</span><span style="color: #000000;">"</span><span style="color: #000000;">DestId\</span><span style="color: #000000;">"</span><span style="color: #000000;"> value=\</span><span style="color: #000000;">"</span><span style="color: #000000;">{ADB0B001</span><span style="color: #000000;">-</span><span style="color: #000000;">10B5</span><span style="color: #000000;">-</span><span style="color: #000000;">3F39</span><span style="color: #000000;">-</span><span style="color: #000000;">27C6</span><span style="color: #000000;">-</span><span style="color: #000000;">9742E785FCD4}\</span><span style="color: #000000;">"</span><span style="color: #000000;"> /></span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"><br />                         </span><span style="color: #000000;">"</span><span style="color: #000000;"><parm name=\</span><span style="color: #000000;">"</span><span style="color: #000000;">UserName\</span><span style="color: #000000;">"</span><span style="color: #000000;"> value=\</span><span style="color: #000000;">"</span><span style="color: #000000;">1</span><span style="color: #000000;">\</span><span style="color: #000000;">"</span><span style="color: #000000;"> /></span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"><br />                         </span><span style="color: #000000;">"</span><span style="color: #000000;"><parm name=\</span><span style="color: #000000;">"</span><span style="color: #000000;">Password\</span><span style="color: #000000;">"</span><span style="color: #000000;"> value=\</span><span style="color: #000000;">"</span><span style="color: #000000;">1</span><span style="color: #000000;">\</span><span style="color: #000000;">"</span><span style="color: #000000;"> /></span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"><br />                         </span><span style="color: #000000;">"</span><span style="color: #000000;"><parm name=\</span><span style="color: #000000;">"</span><span style="color: #000000;">Domain\</span><span style="color: #000000;">"</span><span style="color: #000000;"> value=\</span><span style="color: #000000;">"</span><span style="color: #000000;">\</span><span style="color: #000000;">"</span><span style="color: #000000;"> /></span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"><br />                         </span><span style="color: #000000;">"</span><span style="color: #000000;"><characteristic type=\</span><span style="color: #000000;">"</span><span style="color: #000000;">DevSpecificCellular\</span><span style="color: #000000;">"</span><span style="color: #000000;">></span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"><br />                         </span><span style="color: #000000;">"</span><span style="color: #000000;"><parm name=\</span><span style="color: #000000;">"</span><span style="color: #000000;">GPRSInfoValid\</span><span style="color: #000000;">"</span><span style="color: #000000;"> value=\</span><span style="color: #000000;">"</span><span style="color: #000000;">1</span><span style="color: #000000;">\</span><span style="color: #000000;">"</span><span style="color: #000000;"> /></span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"><br />                         </span><span style="color: #000000;">"</span><span style="color: #000000;"><parm name=\</span><span style="color: #000000;">"</span><span style="color: #000000;">GPRSInfoAccessPointName\</span><span style="color: #000000;">"</span><span style="color: #000000;"> value=\</span><span style="color: #000000;">"</span><span style="color: #000000;">xx.js\</span><span style="color: #000000;">"</span><span style="color: #000000;"> /></span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"><br />                         </span><span style="color: #000000;">"</span><span style="color: #000000;"></characteristic></span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"><br />                         </span><span style="color: #000000;">"</span><span style="color: #000000;"></characteristic></span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"><br />                         </span><span style="color: #000000;">"</span><span style="color: #000000;"></characteristic></span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"><br />                         </span><span style="color: #000000;">"</span><span style="color: #000000;"></wap-provisioningdoc></span><span style="color: #000000;">"</span><span style="color: #000000;"><br />                         );<br /> ConfigurationManager.ProcessConfiguration(configDoc, </span><span style="color: #0000ff;">false</span><span style="color: #000000;">);</span></div> ?sh)?<br /> <div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: #000000;">XmlDocument configDoc </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000ff;">new</span><span style="color: #000000;"> XmlDocument();<br /> configDoc.LoadXml(<br />                         </span><span style="color: #000000;">"</span><span style="color: #000000;"><wap-provisioningdoc></span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"><br />                         </span><span style="color: #000000;">"</span><span style="color: #000000;"><characteristic type=\</span><span style="color: #000000;">"</span><span style="color: #000000;">CM_GPRSEntries\</span><span style="color: #000000;">"</span><span style="color: #000000;">></span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"><br />                         </span><span style="color: #000000;">"</span><span style="color: #000000;"><characteristic type=\</span><span style="color: #000000;">"</span><span style="color: #000000;">jsmsa\</span><span style="color: #000000;">"</span><span style="color: #000000;">></span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"><br />                         </span><span style="color: #000000;">"</span><span style="color: #000000;"><parm name=\</span><span style="color: #000000;">"</span><span style="color: #000000;">DestId\</span><span style="color: #000000;">"</span><span style="color: #000000;"> value=\</span><span style="color: #000000;">"</span><span style="color: #000000;">{ADB0B001</span><span style="color: #000000;">-</span><span style="color: #000000;">10B5</span><span style="color: #000000;">-</span><span style="color: #000000;">3F39</span><span style="color: #000000;">-</span><span style="color: #000000;">27C6</span><span style="color: #000000;">-</span><span style="color: #000000;">9742E785FCD4}\</span><span style="color: #000000;">"</span><span style="color: #000000;"> /></span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"><br />                         </span><span style="color: #000000;">"</span><span style="color: #000000;"><parm name=\</span><span style="color: #000000;">"</span><span style="color: #000000;">UserName\</span><span style="color: #000000;">"</span><span style="color: #000000;"> value=\</span><span style="color: #000000;">"xxxx</span><span style="color: #000000;">.js\</span><span style="color: #000000;">"</span><span style="color: #000000;"> /></span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"><br />                         </span><span style="color: #000000;">"</span><span style="color: #000000;"><parm name=\</span><span style="color: #000000;">"</span><span style="color: #000000;">Password\</span><span style="color: #000000;">"</span><span style="color: #000000;"> value=\</span><span style="color: #000000;">"</span><span style="color: #000000;">xxxx\</span><span style="color: #000000;">"</span><span style="color: #000000;"> /></span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"><br />                         </span><span style="color: #000000;">"</span><span style="color: #000000;"><parm name=\</span><span style="color: #000000;">"</span><span style="color: #000000;">Domain\</span><span style="color: #000000;">"</span><span style="color: #000000;"> value=\</span><span style="color: #000000;">"</span><span style="color: #000000;">\</span><span style="color: #000000;">"</span><span style="color: #000000;"> /></span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"><br />                         </span><span style="color: #000000;">"</span><span style="color: #000000;"><parm name=\</span><span style="color: #000000;">"</span><span style="color: #000000;">Phone\</span><span style="color: #000000;">"</span><span style="color: #000000;"> value=\</span><span style="color: #000000;">"</span><span style="color: #000000;">#</span><span style="color: #000000;">777</span><span style="color: #000000;">\</span><span style="color: #000000;">"</span><span style="color: #000000;">/></span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"><br />                         </span><span style="color: #000000;">"</span><span style="color: #000000;"><parm name=\</span><span style="color: #000000;">"</span><span style="color: #000000;">DeviceType\</span><span style="color: #000000;">"</span><span style="color: #000000;"> value=\</span><span style="color: #000000;">"</span><span style="color: #000000;">modem\</span><span style="color: #000000;">"</span><span style="color: #000000;">/></span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"><br />                         </span><span style="color: #000000;">"</span><span style="color: #000000;"><parm name=\</span><span style="color: #000000;">"</span><span style="color: #000000;">DeviceName\</span><span style="color: #000000;">"</span><span style="color: #000000;"> value=\</span><span style="color: #000000;">"</span><span style="color: #000000;">Cellular Line\</span><span style="color: #000000;">"</span><span style="color: #000000;">/></span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"><br />                         </span><span style="color: #000000;">"</span><span style="color: #000000;"><parm name=\</span><span style="color: #000000;">"</span><span style="color: #000000;">Enabled\</span><span style="color: #000000;">"</span><span style="color: #000000;"> value=\</span><span style="color: #000000;">"</span><span style="color: #000000;">1</span><span style="color: #000000;">\</span><span style="color: #000000;">"</span><span style="color: #000000;">/></span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"><br />                         </span><span style="color: #000000;">"</span><span style="color: #000000;"><parm name=\</span><span style="color: #000000;">"</span><span style="color: #000000;">RequirePw\</span><span style="color: #000000;">"</span><span style="color: #000000;"> value=\</span><span style="color: #000000;">"</span><span style="color: #000000;">1</span><span style="color: #000000;">\</span><span style="color: #000000;">"</span><span style="color: #000000;">/></span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"><br />                         </span><span style="color: #000000;">"</span><span style="color: #000000;"><parm name=\</span><span style="color: #000000;">"</span><span style="color: #000000;">DeviceSpecificRAW\</span><span style="color: #000000;">"</span><span style="color: #000000;"> value=\</span><span style="color: #000000;">"</span><span style="color: #000000;">b4010000b4010000b4010000010000000f0000000100000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\</span><span style="color: #000000;">"</span><span style="color: #000000;">/></span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"><br />                         </span><span style="color: #000000;">"</span><span style="color: #000000;"></characteristic></span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"><br />                         </span><span style="color: #000000;">"</span><span style="color: #000000;"></characteristic></span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"><br />                         </span><span style="color: #000000;">"</span><span style="color: #000000;"></wap-provisioningdoc></span><span style="color: #000000;">"</span><span style="color: #000000;"><br />                         );<br /> ConfigurationManager.ProcessConfiguration(configDoc, </span><span style="color: #0000ff;">false</span><span style="color: #000000;">);</span></div> 修改q接的优先Q?br /> <div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: #000000;">                </span><span style="color: #0000ff;">string</span><span style="color: #000000;"> configpreferred </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #000000;">"</span><span style="color: #000000;"> <wap-provisioningdoc> </span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"><br />                                          </span><span style="color: #000000;">"</span><span style="color: #000000;"> <characteristic   type=\</span><span style="color: #000000;">"</span><span style="color: #000000;">cm_planner\</span><span style="color: #000000;">"</span><span style="color: #000000;">> </span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"><br />                                          </span><span style="color: #000000;">"</span><span style="color: #000000;"> <characteristic   type=\</span><span style="color: #000000;">"</span><span style="color: #000000;">preferredconnections\</span><span style="color: #000000;">"</span><span style="color: #000000;">> </span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"><br />                                          </span><span style="color: #000000;">"</span><span style="color: #000000;"> <parm   name=\</span><span style="color: #000000;">"</span><span style="color: #000000;">{ADB0B001</span><span style="color: #000000;">-</span><span style="color: #000000;">10B5</span><span style="color: #000000;">-</span><span style="color: #000000;">3F39</span><span style="color: #000000;">-</span><span style="color: #000000;">27C6</span><span style="color: #000000;">-</span><span style="color: #000000;">9742E785FCD4}\</span><span style="color: #000000;">"</span><span style="color: #000000;">    value=\</span><span style="color: #000000;">"</span><span style="color: #000000;">jsmsa\</span><span style="color: #000000;">"</span><span style="color: #000000;">   /> </span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"><br />                                          </span><span style="color: #000000;">"</span><span style="color: #000000;"> </characteristic> </span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"><br />                                          </span><span style="color: #000000;">"</span><span style="color: #000000;"> </characteristic> </span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"><br />                                          </span><span style="color: #000000;">"</span><span style="color: #000000;"> </wap-provisioningdoc> </span><span style="color: #000000;">"</span><span style="color: #000000;">;</span></div> <br /> 7.发v和断开q接<br /> q两个方法需要另?a href="http://www.aygfsteel.com/Files/TiGERTiAN/connection.zip">两个c?/a>的协?br /> <div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: #000000;">       </span><span style="color: #0000ff;">public</span><span style="color: #000000;"> </span><span style="color: #0000ff;">static</span><span style="color: #000000;"> </span><span style="color: #0000ff;">void</span><span style="color: #000000;"> MakeConnection()<br />         {<br />             </span><span style="color: #0000ff;">try</span><span style="color: #000000;"><br />             {<br />                 ConnectionManager connectManager </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000ff;">new</span><span style="color: #000000;"> ConnectionManager();<br />                 </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> idx </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #000000;">-</span><span style="color: #000000;">1</span><span style="color: #000000;">;<br />                 List</span><span style="color: #000000;"><</span><span style="color: #000000;">ConnectionManager.CONNMGR_DESTINATION_INFO</span><span style="color: #000000;">></span><span style="color: #000000;"> lstIdentifiers </span><span style="color: #000000;">=</span><span style="color: #000000;"> connectManager.EnumConnDestinations();<br /> <br />                 </span><span style="color: #0000ff;">for</span><span style="color: #000000;"> (</span><span style="color: #0000ff;">int</span><span style="color: #000000;"> i </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #000000;">0</span><span style="color: #000000;">; i </span><span style="color: #000000;"><</span><span style="color: #000000;"> lstIdentifiers.Count; i</span><span style="color: #000000;">++</span><span style="color: #000000;">)<br />                 {<br />                     </span><span style="color: #0000ff;">if</span><span style="color: #000000;"> (</span><span style="color: #000000;">"</span><span style="color: #000000;">Internet q接</span><span style="color: #000000;">"</span><span style="color: #000000;">.Equals(lstIdentifiers[i].Description))<br />                     {<br />                         idx </span><span style="color: #000000;">=</span><span style="color: #000000;"> i;<br />                         </span><span style="color: #0000ff;">break</span><span style="color: #000000;">;<br />                     }<br />                 }<br /> <br />                 </span><span style="color: #0000ff;">if</span><span style="color: #000000;"> (idx </span><span style="color: #000000;">></span><span style="color: #000000;"> </span><span style="color: #000000;">-</span><span style="color: #000000;">1</span><span style="color: #000000;">)<br />                 {<br />                     connectManager.EstablishConnection((</span><span style="color: #0000ff;">uint</span><span style="color: #000000;">)idx);<br />                 }<br />             }<br />             </span><span style="color: #0000ff;">catch</span><span style="color: #000000;"><br />             {<br />             }<br />         }<br /> <br />   </span><span style="color: #808080;"><br /> </span><span style="color: #000000;">        </span><span style="color: #0000ff;">public</span><span style="color: #000000;"> </span><span style="color: #0000ff;">static</span><span style="color: #000000;"> </span><span style="color: #0000ff;">void</span><span style="color: #000000;"> Disconnect()<br />         {<br />             </span><span style="color: #0000ff;">try</span><span style="color: #000000;"><br />             {<br />                 RASManager.RASCONN[] conns </span><span style="color: #000000;">=</span><span style="color: #000000;"> RASManager.GetRASConnections();<br />                 </span><span style="color: #0000ff;">if</span><span style="color: #000000;"> (conns </span><span style="color: #000000;">!=</span><span style="color: #000000;"> </span><span style="color: #0000ff;">null</span><span style="color: #000000;"> </span><span style="color: #000000;">&&</span><span style="color: #000000;"> conns.Length </span><span style="color: #000000;">></span><span style="color: #000000;"> </span><span style="color: #000000;">0</span><span style="color: #000000;">)<br />                 {<br />                     </span><span style="color: #0000ff;">foreach</span><span style="color: #000000;"> (RASManager.RASCONN conn </span><span style="color: #0000ff;">in</span><span style="color: #000000;"> conns)<br />                     {<br />                         </span><span style="color: #0000ff;">try</span><span style="color: #000000;"><br />                         {<br />                             RASManager.HangUp(conn.hRasConnHandle);<br />                         }<br />                         </span><span style="color: #0000ff;">catch</span><span style="color: #000000;"> (Exception ex)<br />                         {<br />                         }<br />                     }<br />                 }<br />             }<br />             </span><span style="color: #0000ff;">catch</span><span style="color: #000000;"><br />             {<br />             }<br />         }</span></div> <br /> <img src ="http://www.aygfsteel.com/TiGERTiAN/aggbug/232898.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/TiGERTiAN/" target="_blank">TiGERTiAN</a> 2008-10-07 13:02 <a href="http://www.aygfsteel.com/TiGERTiAN/archive/2008/10/07/232898.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>C#获得和发送网站Sessionhttp://www.aygfsteel.com/TiGERTiAN/archive/2008/10/04/232290.htmlTiGERTiANTiGERTiANSat, 04 Oct 2008 02:41:00 GMThttp://www.aygfsteel.com/TiGERTiAN/archive/2008/10/04/232290.htmlhttp://www.aygfsteel.com/TiGERTiAN/comments/232290.htmlhttp://www.aygfsteel.com/TiGERTiAN/archive/2008/10/04/232290.html#Feedback0http://www.aygfsteel.com/TiGERTiAN/comments/commentRss/232290.htmlhttp://www.aygfsteel.com/TiGERTiAN/services/trackbacks/232290.html                request = (HttpWebRequest)WebRequest.Create(url);
                
if (Const.session != null)
                
{
                    request.Headers.Add(
"Cookie", Const.session);
                }

                request.Timeout 
= 30000//讑֮时?/span>
                request.ContentType = "application/octet-stream";
                request.Method 
= "POST";
                request.ContentLength 
= outData.Length;

                stream 
= request.GetRequestStream();
                stream.Write(outData, 
0, outData.Length);
                stream.Flush();
                stream.Close();
                Const.uiWaitMessage 
= "h发送完毕,开始接收数?/span>";
                Thread.Sleep(
500);
                
//发送完?br />                 //接收数据
                response = (HttpWebResponse)request.GetResponse();
                
if (Const.session == null)
                
{// 注销后要清除Common.session
                    String cookie = response.GetResponseHeader("Set-Cookie");
                    
if (cookie != null)
                    
{
                        
int n = cookie.IndexOf(';');
                        
if (n > -1)  Const.session = cookie.Substring(0, n);
                    }

                }

使用
                if (Const.session == null)
                
{// 注销后要清除Common.session
                    String cookie = response.GetResponseHeader("Set-Cookie");
                    
if (cookie != null)
                    
{
                        
int n = cookie.IndexOf(';');
                        
if (n > -1)  Const.session = cookie.Substring(0, n);
                    }

                }
可以获得q保存网站分配的Session信息

q样每次讉K指定url的时候就可以先用
                if (Const.session != null)
                
{
                    request.Headers.Add(
"Cookie", Const.session);
                }
来添加CookieQ将已获得Session信息发送到|站?

TiGERTiAN 2008-10-04 10:41 发表评论
]]>
HttpWebRequest使用注意Q发生阻塞的解决办法Q?/title><link>http://www.aygfsteel.com/TiGERTiAN/archive/2008/09/08/227708.html</link><dc:creator>TiGERTiAN</dc:creator><author>TiGERTiAN</author><pubDate>Mon, 08 Sep 2008 04:52:00 GMT</pubDate><guid>http://www.aygfsteel.com/TiGERTiAN/archive/2008/09/08/227708.html</guid><wfw:comment>http://www.aygfsteel.com/TiGERTiAN/comments/227708.html</wfw:comment><comments>http://www.aygfsteel.com/TiGERTiAN/archive/2008/09/08/227708.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.aygfsteel.com/TiGERTiAN/comments/commentRss/227708.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/TiGERTiAN/services/trackbacks/227708.html</trackback:ping><description><![CDATA[<div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: #000000">HttpWebRequest myRequest </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">null</span><span style="color: #000000">;<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />            HttpWebResponse myResponse </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">null</span><span style="color: #000000">;<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />            Stream reqStream </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">null</span><span style="color: #000000">; <br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />            Stream resStream </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">null</span><span style="color: #000000">;<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />            </span><span style="color: #0000ff">try</span><span style="color: #000000"><br /> <img id="Codehighlighter1_184_1249_Open_Image" onclick="this.style.display='none'; Codehighlighter1_184_1249_Open_Text.style.display='none'; Codehighlighter1_184_1249_Closed_Image.style.display='inline'; Codehighlighter1_184_1249_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_184_1249_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_184_1249_Closed_Text.style.display='none'; Codehighlighter1_184_1249_Open_Image.style.display='inline'; Codehighlighter1_184_1249_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align="top" />            </span><span id="Codehighlighter1_184_1249_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_184_1249_Open_Text"><span style="color: #000000">{<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                </span><span style="color: #0000ff">byte</span><span style="color: #000000">[] data </span><span style="color: #000000">=</span><span style="color: #000000"> System.Text.Encoding.Default.GetBytes(param);<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: #008000"><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: #000000">                myRequest </span><span style="color: #000000">=</span><span style="color: #000000"> (HttpWebRequest)WebRequest.Create(url);<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                myRequest.Method </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">POST</span><span style="color: #000000">"</span><span style="color: #000000">;<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                myRequest.KeepAlive </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">true</span><span style="color: #000000">;<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                myRequest.ContentType </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">application/octet-stream</span><span style="color: #000000">"</span><span style="color: #000000">;<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                myRequest.ContentLength </span><span style="color: #000000">=</span><span style="color: #000000"> data.Length;<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                reqStream </span><span style="color: #000000">=</span><span style="color: #000000"> myRequest.GetRequestStream();<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                reqStream.Write(data, </span><span style="color: #000000">0</span><span style="color: #000000">, data.Length);<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                reqStream.Close();<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                myResponse </span><span style="color: #000000">=</span><span style="color: #000000"> (HttpWebResponse)myRequest.GetResponse();<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                resStream </span><span style="color: #000000">=</span><span style="color: #000000"> myResponse.GetResponseStream();<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                data </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> </span><span style="color: #0000ff">byte</span><span style="color: #000000">[</span><span style="color: #000000">512</span><span style="color: #000000">];<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                </span><span style="color: #0000ff">int</span><span style="color: #000000"> count </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                UIFactory.zZRK_MODIForm.memStream </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> MemoryStream();<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                </span><span style="color: #0000ff">while</span><span style="color: #000000"> ((count </span><span style="color: #000000">=</span><span style="color: #000000"> resStream.Read(data, </span><span style="color: #000000">0</span><span style="color: #000000">, data.Length)) </span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">)<br /> <img id="Codehighlighter1_1088_1183_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1088_1183_Open_Text.style.display='none'; Codehighlighter1_1088_1183_Closed_Image.style.display='inline'; Codehighlighter1_1088_1183_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_1088_1183_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1088_1183_Closed_Text.style.display='none'; Codehighlighter1_1088_1183_Open_Image.style.display='inline'; Codehighlighter1_1088_1183_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />                </span><span id="Codehighlighter1_1088_1183_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_1088_1183_Open_Text"><span style="color: #000000">{<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                    UIFactory.zZRK_MODIForm.memStream.Write(data, </span><span style="color: #000000">0</span><span style="color: #000000">, count);<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />                }</span></span><span style="color: #000000"><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                resStream.Close();<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                <br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />            }</span></span><span style="color: #000000"><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />            </span><span style="color: #0000ff">catch</span><span style="color: #000000"><br /> <img id="Codehighlighter1_1281_1295_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1281_1295_Open_Text.style.display='none'; Codehighlighter1_1281_1295_Closed_Image.style.display='inline'; Codehighlighter1_1281_1295_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_1281_1295_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1281_1295_Closed_Text.style.display='none'; Codehighlighter1_1281_1295_Open_Image.style.display='inline'; Codehighlighter1_1281_1295_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align="top" />            </span><span id="Codehighlighter1_1281_1295_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_1281_1295_Open_Text"><span style="color: #000000">{<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />            }</span></span><span style="color: #000000"><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />            </span><span style="color: #0000ff">finally</span><span style="color: #000000"><br /> <img id="Codehighlighter1_1329_1687_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1329_1687_Open_Text.style.display='none'; Codehighlighter1_1329_1687_Closed_Image.style.display='inline'; Codehighlighter1_1329_1687_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_1329_1687_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1329_1687_Closed_Text.style.display='none'; Codehighlighter1_1329_1687_Open_Image.style.display='inline'; Codehighlighter1_1329_1687_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align="top" />            </span><span id="Codehighlighter1_1329_1687_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_1329_1687_Open_Text"><span style="color: #000000">{<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                </span><span style="color: #0000ff">if</span><span style="color: #000000"> (resStream </span><span style="color: #000000">!=</span><span style="color: #000000"> </span><span style="color: #0000ff">null</span><span style="color: #000000">)<br /> <img id="Codehighlighter1_1386_1443_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1386_1443_Open_Text.style.display='none'; Codehighlighter1_1386_1443_Closed_Image.style.display='inline'; Codehighlighter1_1386_1443_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_1386_1443_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1386_1443_Closed_Text.style.display='none'; Codehighlighter1_1386_1443_Open_Image.style.display='inline'; Codehighlighter1_1386_1443_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />                </span><span id="Codehighlighter1_1386_1443_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_1386_1443_Open_Text"><span style="color: #000000">{<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                    resStream.Close();<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />                }</span></span><span style="color: #000000"><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                </span><span style="color: #0000ff">if</span><span style="color: #000000"> (reqStream </span><span style="color: #000000">!=</span><span style="color: #000000"> </span><span style="color: #0000ff">null</span><span style="color: #000000">)<br /> <img id="Codehighlighter1_1500_1557_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1500_1557_Open_Text.style.display='none'; Codehighlighter1_1500_1557_Closed_Image.style.display='inline'; Codehighlighter1_1500_1557_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_1500_1557_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1500_1557_Closed_Text.style.display='none'; Codehighlighter1_1500_1557_Open_Image.style.display='inline'; Codehighlighter1_1500_1557_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />                </span><span id="Codehighlighter1_1500_1557_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_1500_1557_Open_Text"><span style="color: #000000">{<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                    reqStream.Close();<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />                }</span></span><span style="color: #000000"><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                </span><span style="color: #0000ff">if</span><span style="color: #000000"> (myResponse </span><span style="color: #000000">!=</span><span style="color: #000000"> </span><span style="color: #0000ff">null</span><span style="color: #000000">)<br /> <img id="Codehighlighter1_1615_1673_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1615_1673_Open_Text.style.display='none'; Codehighlighter1_1615_1673_Closed_Image.style.display='inline'; Codehighlighter1_1615_1673_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_1615_1673_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1615_1673_Closed_Text.style.display='none'; Codehighlighter1_1615_1673_Open_Image.style.display='inline'; Codehighlighter1_1615_1673_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />                </span><span id="Codehighlighter1_1615_1673_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_1615_1673_Open_Text"><span style="color: #000000">{<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                    myResponse.Close();<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />                }</span></span><span style="color: #000000"><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />            }</span></span></div> 大家看下q段E序Q有问题吗?乍一看,好像没有什么问题,所有的都释放了,Response也释放了。。不q如果你写个循环无限ơ发赯求,你会(x)发现Q运行不了几ơ就d了。ؓ(f)什么呢Q大家看下面的代?br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: #000000">HttpWebRequest myRequest </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">null</span><span style="color: #000000">;<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />            HttpWebResponse myResponse </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">null</span><span style="color: #000000">;<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />            Stream reqStream </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">null</span><span style="color: #000000">; <br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />            Stream resStream </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">null</span><span style="color: #000000">;<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />            </span><span style="color: #0000ff">try</span><span style="color: #000000"><br /> <img id="Codehighlighter1_184_1249_Open_Image" onclick="this.style.display='none'; Codehighlighter1_184_1249_Open_Text.style.display='none'; Codehighlighter1_184_1249_Closed_Image.style.display='inline'; Codehighlighter1_184_1249_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_184_1249_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_184_1249_Closed_Text.style.display='none'; Codehighlighter1_184_1249_Open_Image.style.display='inline'; Codehighlighter1_184_1249_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align="top" />            </span><span id="Codehighlighter1_184_1249_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_184_1249_Open_Text"><span style="color: #000000">{<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                </span><span style="color: #0000ff">byte</span><span style="color: #000000">[] data </span><span style="color: #000000">=</span><span style="color: #000000"> System.Text.Encoding.Default.GetBytes(param);<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                </span><span style="color: #008000">//</span><span style="color: #008000">x务器端发送请求,获取照片信息</span><span style="color: #008000"><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: #000000">                myRequest </span><span style="color: #000000">=</span><span style="color: #000000"> (HttpWebRequest)WebRequest.Create(url);<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                myRequest.Method </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">POST</span><span style="color: #000000">"</span><span style="color: #000000">;<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                myRequest.KeepAlive </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">true</span><span style="color: #000000">;<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                myRequest.ContentType </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">application/octet-stream</span><span style="color: #000000">"</span><span style="color: #000000">;<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                myRequest.ContentLength </span><span style="color: #000000">=</span><span style="color: #000000"> data.Length;<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                reqStream </span><span style="color: #000000">=</span><span style="color: #000000"> myRequest.GetRequestStream();<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                reqStream.Write(data, </span><span style="color: #000000">0</span><span style="color: #000000">, data.Length);<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                reqStream.Close();<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                myResponse </span><span style="color: #000000">=</span><span style="color: #000000"> (HttpWebResponse)myRequest.GetResponse();<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                resStream </span><span style="color: #000000">=</span><span style="color: #000000"> myResponse.GetResponseStream();<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                data </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> </span><span style="color: #0000ff">byte</span><span style="color: #000000">[</span><span style="color: #000000">512</span><span style="color: #000000">];<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                </span><span style="color: #0000ff">int</span><span style="color: #000000"> count </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                UIFactory.zZRK_MODIForm.memStream </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> MemoryStream();<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                </span><span style="color: #0000ff">while</span><span style="color: #000000"> ((count </span><span style="color: #000000">=</span><span style="color: #000000"> resStream.Read(data, </span><span style="color: #000000">0</span><span style="color: #000000">, data.Length)) </span><span style="color: #000000">></span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">)<br /> <img id="Codehighlighter1_1088_1183_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1088_1183_Open_Text.style.display='none'; Codehighlighter1_1088_1183_Closed_Image.style.display='inline'; Codehighlighter1_1088_1183_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_1088_1183_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1088_1183_Closed_Text.style.display='none'; Codehighlighter1_1088_1183_Open_Image.style.display='inline'; Codehighlighter1_1088_1183_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />                </span><span id="Codehighlighter1_1088_1183_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_1088_1183_Open_Text"><span style="color: #000000">{<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                    UIFactory.zZRK_MODIForm.memStream.Write(data, </span><span style="color: #000000">0</span><span style="color: #000000">, count);<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />                }</span></span><span style="color: #000000"><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                resStream.Close();<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                <br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />            }</span></span><span style="color: #000000"><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />            </span><span style="color: #0000ff">catch</span><span style="color: #000000"><br /> <img id="Codehighlighter1_1281_1295_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1281_1295_Open_Text.style.display='none'; Codehighlighter1_1281_1295_Closed_Image.style.display='inline'; Codehighlighter1_1281_1295_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_1281_1295_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1281_1295_Closed_Text.style.display='none'; Codehighlighter1_1281_1295_Open_Image.style.display='inline'; Codehighlighter1_1281_1295_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align="top" />            </span><span id="Codehighlighter1_1281_1295_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_1281_1295_Open_Text"><span style="color: #000000">{<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />            }</span></span><span style="color: #000000"><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" />            </span><span style="color: #0000ff">finally</span><span style="color: #000000"><br /> <img id="Codehighlighter1_1329_1801_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1329_1801_Open_Text.style.display='none'; Codehighlighter1_1329_1801_Closed_Image.style.display='inline'; Codehighlighter1_1329_1801_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_1329_1801_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1329_1801_Closed_Text.style.display='none'; Codehighlighter1_1329_1801_Open_Image.style.display='inline'; Codehighlighter1_1329_1801_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align="top" />            </span><span id="Codehighlighter1_1329_1801_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_1329_1801_Open_Text"><span style="color: #000000">{<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                </span><span style="color: #0000ff">if</span><span style="color: #000000"> (resStream </span><span style="color: #000000">!=</span><span style="color: #000000"> </span><span style="color: #0000ff">null</span><span style="color: #000000">)<br /> <img id="Codehighlighter1_1386_1443_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1386_1443_Open_Text.style.display='none'; Codehighlighter1_1386_1443_Closed_Image.style.display='inline'; Codehighlighter1_1386_1443_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_1386_1443_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1386_1443_Closed_Text.style.display='none'; Codehighlighter1_1386_1443_Open_Image.style.display='inline'; Codehighlighter1_1386_1443_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />                </span><span id="Codehighlighter1_1386_1443_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_1386_1443_Open_Text"><span style="color: #000000">{<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                    resStream.Close();<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />                }</span></span><span style="color: #000000"><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                </span><span style="color: #0000ff">if</span><span style="color: #000000"> (reqStream </span><span style="color: #000000">!=</span><span style="color: #000000"> </span><span style="color: #0000ff">null</span><span style="color: #000000">)<br /> <img id="Codehighlighter1_1500_1557_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1500_1557_Open_Text.style.display='none'; Codehighlighter1_1500_1557_Closed_Image.style.display='inline'; Codehighlighter1_1500_1557_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_1500_1557_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1500_1557_Closed_Text.style.display='none'; Codehighlighter1_1500_1557_Open_Image.style.display='inline'; Codehighlighter1_1500_1557_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />                </span><span id="Codehighlighter1_1500_1557_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_1500_1557_Open_Text"><span style="color: #000000">{<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                    reqStream.Close();<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />                }</span></span><span style="color: #000000"><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                </span><span style="color: #0000ff">if</span><span style="color: #000000"> (myResponse </span><span style="color: #000000">!=</span><span style="color: #000000"> </span><span style="color: #0000ff">null</span><span style="color: #000000">)<br /> <img id="Codehighlighter1_1615_1673_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1615_1673_Open_Text.style.display='none'; Codehighlighter1_1615_1673_Closed_Image.style.display='inline'; Codehighlighter1_1615_1673_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_1615_1673_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1615_1673_Closed_Text.style.display='none'; Codehighlighter1_1615_1673_Open_Image.style.display='inline'; Codehighlighter1_1615_1673_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />                </span><span id="Codehighlighter1_1615_1673_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_1615_1673_Open_Text"><span style="color: #000000">{<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                    myResponse.Close();<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />                }</span></span><span style="color: #000000"><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                </span><span style="color: #0000ff">if</span><span style="color: #000000"> (myRequest </span><span style="color: #000000">!=</span><span style="color: #000000"> </span><span style="color: #0000ff">null</span><span style="color: #000000">)<br /> <img id="Codehighlighter1_1730_1787_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1730_1787_Open_Text.style.display='none'; Codehighlighter1_1730_1787_Closed_Image.style.display='inline'; Codehighlighter1_1730_1787_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_1730_1787_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1730_1787_Closed_Text.style.display='none'; Codehighlighter1_1730_1787_Open_Image.style.display='inline'; Codehighlighter1_1730_1787_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />                </span><span id="Codehighlighter1_1730_1787_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_1730_1787_Open_Text"><span style="color: #000000">{<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                    myRequest.Abort();<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />                }</span></span><span style="color: #000000"><br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />            }</span></span></div> 多了些什么?多了q个<br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /><span style="color: #000000">                </span><span style="color: #0000ff">if</span><span style="color: #000000"> (myRequest </span><span style="color: #000000">!=</span><span style="color: #000000"> </span><span style="color: #0000ff">null</span><span style="color: #000000">)<br /> <img id="Codehighlighter1_55_112_Open_Image" onclick="this.style.display='none'; Codehighlighter1_55_112_Open_Text.style.display='none'; Codehighlighter1_55_112_Closed_Image.style.display='inline'; Codehighlighter1_55_112_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_55_112_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_55_112_Closed_Text.style.display='none'; Codehighlighter1_55_112_Open_Image.style.display='inline'; Codehighlighter1_55_112_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align="top" />                </span><span id="Codehighlighter1_55_112_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_55_112_Open_Text"><span style="color: #000000">{<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />                    myRequest.Abort();<br /> <img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />                }</span></span></div> 其实很多时候释放了Stream和Responseq不够,客户端的Requestq是在保持着Q需要等垃圾回收器来回收Q所以一般很Ҏ(gu)dQ导致请求发送不出去。加上这个就是让HttpWebRequest实例在不需要的时候及(qing)旉放资源。这样可以重复用而不?x)阻塞? <img src ="http://www.aygfsteel.com/TiGERTiAN/aggbug/227708.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/TiGERTiAN/" target="_blank">TiGERTiAN</a> 2008-09-08 12:52 <a href="http://www.aygfsteel.com/TiGERTiAN/archive/2008/09/08/227708.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <a href="http://www.aygfsteel.com/" title="狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频">狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频</a> </div> </footer> վ֩ģ壺 <a href="http://" target="_blank">½</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">Ϸ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ƽ</a>| <a href="http://" target="_blank">Ĭ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ĺ</a>| <a href="http://" target="_blank">Զ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">̫</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ʲ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">°Ͷ</a>| <a href="http://" target="_blank">ͭ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">IJ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ʳ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ˮ</a>| <a href="http://" target="_blank">ʢ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">̩</a>| <a href="http://" target="_blank">԰</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ͷ</a>| <a href="http://" target="_blank">׸</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ɽ</a>| <a href="http://" target="_blank">ɼ</a>| <a href="http://" target="_blank"></a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>