windows mobile上的gprs连接(基于tcpclient)

windows mobile上的gprs连接(基于tcpclient)

ID:9491474

大小:58.00 KB

页数:5页

时间:2018-05-01

windows mobile上的gprs连接(基于tcpclient)_第1页
windows mobile上的gprs连接(基于tcpclient)_第2页
windows mobile上的gprs连接(基于tcpclient)_第3页
windows mobile上的gprs连接(基于tcpclient)_第4页
windows mobile上的gprs连接(基于tcpclient)_第5页
资源描述:

《windows mobile上的gprs连接(基于tcpclient)》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库

1、WindowsMobile上的GPRS连接(基于TcpClient)  在有线的连接和grApiReadyEvent();           mre.GR_PARAM_GUIDDEST;           ci.d=0;           if(ConnMgrEstablishConnectionSync(refci,refphConnection,INFINITE,refstatus)!=S_OK               status!=CONNMGR_STATUS_CONNECTED)      

2、         returnfalse;           ht[urlStr]=phConnection;           returntrue;       }       publicstaticboolRelease(Uriurl)       {           returnRelease(url.ToString());       }       publicstaticboolRelease(stringurlStr)       {           returnRelease(

3、urlStr,true);       }       privatestaticboolRelease(stringurlStr,boolremoveNode)       {           boolres=true;           IntPtrph=IntPtr.Zero;           if(ht[urlStr]==null)               returntrue;           ph=(IntPtr)ht[urlStr];           if(ConnMgrRe

4、leaseConnection(ph,1)!=S_OK)       12下一页——感谢阅读这篇文章,..,res=false;           CloseHandle(ph);           if(removeNode)               ht.Remove(urlStr);           returnres;       }       publicstaticvoidReleaseAll()       {          foreach(DictionaryEntrydein

5、ht)          {              Release((string)de.Key,false);          }          ht.Clear();       }       [StructLayout(LayoutKind.Sequential)]       publicstructConnectionInfo       {           publicuintcbSize;           publicuintds;           publicuintd;

6、           publicuintulMaxCost;           publicuintulMinRcvBport(cellcore.dll)]       privatestaticexternintConnMgrMapURL(stringpport(cellcore.dll)]       privatestaticexternintConnMgrEstablishConnectionSync(refConnectionInfoci,refIntPtrphConnection,uintdeo

7、ut,refuintpdport(cellcore.dll)]       privatestaticexternIntPtrConnMgrApiReadyEvent();       [DllImport(cellcore.dll)]       privatestaticexternintConnMgrReleaseConnection(IntPtrhConnection,intbCache);       [DllImport(coredll.dll)]       privatestaticextern

8、intCloseHandle(IntPtrhObject);   }  使用GPRSConnectionclass的时候,先调用Setup方法创建连接,见以下代码:       publicvoidDoTcpConnection()       {           stringurl=.msn.;           boolres=GPRSConnection.Setup(ant

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。