⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 高手啊,,帮我将这个c程序改写delphi吧。有难度的。有关pdu转码的问题 delphi - windows sdk-api - csdn社区 community_csdn_net.htm

📁 PDU协议解释,分析信息传输的具体指令,扩大实际数据量
💻 HTM
📖 第 1 页 / 共 5 页
字号:
&nbsp; 'A' &nbsp; + &nbsp; 10) &nbsp; &lt;&lt; &nbsp; 4; &nbsp; <BR>&nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; <BR>&nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; pSrc++; &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 
&nbsp; 输出低4位 &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; if(*pSrc&gt;='0' &nbsp; &amp;&amp; &nbsp; *pSrc&lt;='9') &nbsp; 
<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; { &nbsp; 
<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; *pDst &nbsp; |= &nbsp; *pSrc &nbsp; - &nbsp; '0'; &nbsp; 
<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; 
<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else &nbsp; 
<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; { &nbsp; 
<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; *pDst &nbsp; |= &nbsp; *pSrc &nbsp; - &nbsp; 'A' &nbsp; + &nbsp; 
10; &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } 
&nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
pSrc++; &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; pDst++; &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; <BR>&nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 
&nbsp; 返回目标数据长度 &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; returnnSrcLength 
&nbsp; / &nbsp; 2; &nbsp; <BR>&nbsp; } &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; <BR>&nbsp; // &nbsp; 字节数据转换为可打印字符串 &nbsp; <BR>&nbsp; // &nbsp; 
如:{0xC8, &nbsp; 0x32, &nbsp; 0x9B, &nbsp; 0xFD, &nbsp; 0x0E, &nbsp; 0x01} &nbsp; 
--&gt; &nbsp; "C8329BFD0E01" &nbsp; &nbsp; <BR>&nbsp; // &nbsp; pSrc: &nbsp; 
源数据指针 &nbsp; <BR>&nbsp; // &nbsp; pDst: &nbsp; 目标字符串指针 &nbsp; <BR>&nbsp; // 
&nbsp; nSrcLength: &nbsp; 源数据长度 &nbsp; <BR>&nbsp; // &nbsp; 返回: &nbsp; 目标字符串长度 
&nbsp; <BR>&nbsp; int &nbsp; gsmBytes2String(const &nbsp; unsigned &nbsp; char* 
&nbsp; pSrc, &nbsp; char* &nbsp; pDst, &nbsp; int &nbsp; nSrcLength) &nbsp; 
<BR>&nbsp; { &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; const &nbsp; char 
&nbsp; tab[]="0123456789ABCDEF"; &nbsp; &nbsp; &nbsp; &nbsp; // &nbsp; 
0x0-0xf的字符查找表 &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <BR>&nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; for(int &nbsp; i=0; &nbsp; i&lt;nSrcLength; &nbsp; 
i++) &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; { &nbsp; <BR>&nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // &nbsp; 输出低4位 &nbsp; 
<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; *pDst++ 
&nbsp; = &nbsp; tab[*pSrc &nbsp; &gt;&gt; &nbsp; 4]; &nbsp; <BR>&nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; // &nbsp; 输出高4位 &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; *pDst++ &nbsp; = &nbsp; tab[*pSrc &nbsp; &amp; 
&nbsp; 0x0f]; &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <BR>&nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pSrc++; &nbsp; 
<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // &nbsp; 输出字符串加个结束符 &nbsp; 
<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; *pDst &nbsp; = &nbsp; '\0'; &nbsp; 
<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; // &nbsp; 返回目标字符串长度 &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return 
&nbsp; nSrcLength &nbsp; * &nbsp; 2; &nbsp; <BR>&nbsp; } &nbsp; <BR>&nbsp; <A 
href="http://topic.csdn.net/t/20050331/19/3898783.html#">Top</A></P>
<H3><STRONG><A class=anchor name=r_28762107>11 楼</A>tgh1981(虚拟等待)<INPUT class=user2 title="二级用户 该版得分小于等于500分,大于100分" type=button></STRONG><SPAN>回复于 
2005-04-04 17:15:26 得分 0 </SPAN></H3>
<P>高手啊!学习!!<A 
href="http://topic.csdn.net/t/20050331/19/3898783.html#">Top</A></P>
<H4><STRONG>相关问题</STRONG></H4>
<DIV class=relation>
<UL>
  <LI><A href="http://topic.csdn.net/t/20010823/16/252993.html" 
  rel=external>谁能帮我把这段delphi代码改写成C++Builder的!!!</A> 
  <LI><A href="http://topic.csdn.net/t/20020525/13/751703.html" 
  rel=external>这段C语言代码怎样改写成Delphi代码啊</A> 
  <LI><A href="http://topic.csdn.net/t/20060222/19/4571361.html" 
  rel=external>Delphi调用C的DLL库,部分内存被改写。谢谢。</A> 
  <LI><A href="http://topic.csdn.net/t/20050216/10/3784992.html" 
  rel=external>改写C#为VB.NET</A> 
  <LI><A href="http://topic.csdn.net/t/20050824/11/4228024.html" rel=external>VC 
  -&gt; Delphi 改写</A> 
  <LI><A href="http://topic.csdn.net/t/20050608/11/4067387.html" 
  rel=external>下料问题算法代码(c++),请能把它改写成Delphi</A> 
  <LI><A href="http://topic.csdn.net/t/20050620/19/4094957.html" 
  rel=external>请帮忙把一段Delphi代码改写成C++ Builder代码,谢谢!</A> 
  <LI><A href="http://topic.csdn.net/t/20021019/04/1108133.html" 
  rel=external>C++ to Delphi</A> 
  <LI><A href="http://topic.csdn.net/t/20050517/10/4012774.html" 
  rel=external>C#--&gt;DELPHI</A> 
  <LI><A href="http://topic.csdn.net/t/20020807/18/928316.html" 
  rel=external>请帮忙改写此函数(C#)</A> </LI></UL></DIV></DIV></DIV>
<DIV id=sidebar>
<H3>关键词</H3>
<DIV>
<UL>
  <LI><A href="http://tag.csdn.net/tag/c++/" rel=external>c++</A> 
  <LI><A href="http://tag.csdn.net/tag/指针/" rel=external>指针</A> 
  <LI><A href="http://tag.csdn.net/tag/编码/" rel=external>编码</A> 
  <LI><A href="http://tag.csdn.net/tag/解码/" rel=external>解码</A> 
  <LI><A href="http://tag.csdn.net/tag/数值/" rel=external>数值</A> 
  <LI><A href="http://tag.csdn.net/tag/字符/" rel=external>字符</A> 
  <LI><A href="http://tag.csdn.net/tag/函数/" rel=external>函数</A> 
  <LI><A href="http://tag.csdn.net/tag/数据/" rel=external>数据</A> 
  <LI><A href="http://tag.csdn.net/tag/psrc/" rel=external>psrc</A> 
  <LI><A href="http://tag.csdn.net/tag/字符串/" rel=external>字符串</A> </LI></UL></DIV>
<H3>得分解答快速导航</H3>
<DIV>
<UL>
  <LI>帖主:<A 
  href="http://topic.csdn.net/t/20050331/19/3898783.html#Top">WangMinYI</A> 
  <LI><A 
  href="http://topic.csdn.net/t/20050331/19/3898783.html#r_28688934">flyinwuhan</A> 
  </LI></UL></DIV>
<H3>相关链接</H3>
<DIV>
<UL>
  <LI><A 
  href="http://www.dearbook.com.cn/Book/SearchBook.aspx?sortid=5&amp;sorttype=smallsort" 
  target=_blank>Delphi类图书</A> 
  <LI><A href="http://www.codechina.net/resource/sort.php/19" 
  target=_blank>Delphi类源码下载</A> 
  <LI><A 
  href="http://www.codechina.net/resource/sort.php?sortid=45&amp;classid=1.8" 
  target=_blank>Delphi控件下载</A> </LI></UL></DIV>
<H3>广告也精彩</H3>
<DIV>
<SCRIPT 
src="高手啊,,帮我将这个C程序改写DELPHI吧。有难度的。有关PDU转码的问题 Delphi - Windows SDK-API - CSDN社区 community_csdn_net.files/show_ads.js" 
type=text/javascript></SCRIPT>
</DIV>
<H3>反馈</H3>
<DIV>请通过下述方式给我们反馈<BR><IMG alt=反馈 
src="高手啊,,帮我将这个C程序改写DELPHI吧。有难度的。有关PDU转码的问题 Delphi - Windows SDK-API - CSDN社区 community_csdn_net.files/feedback.gif"></DIV></DIV>
<DIV class=clear></DIV></DIV>
<DIV class=CSDN-PHF id=CSDNPF>
<HR>
<A class=biaoshi 
href="http://www.hd315.gov.cn/beian/view.asp?bianhao=010202001032100010" 
rel=external>&nbsp;</A> 
<DIV><A href="http://www.csdn.net/intro/intro.asp?id=2" rel=external>网站简介</A>-<A 
href="http://www.csdn.net/intro/intro.asp?id=5" rel=external>广告服务</A>-<A 
href="http://www.csdn.net/map/map.shtm" rel=external>网站地图</A>-<A 
href="http://www.csdn.net/help/help.asp" rel=external>帮助</A>-<A 
href="http://www.csdn.net/intro/intro.asp?id=9" rel=external>联系方式</A>-<A 
href="http://job.csdn.net/Jobs/f9c75c9f2ad14404a604669b757b9ed0/viewcompany.aspx" 
rel=external>诚聘英才</A>-<A href="http://www.csdn.net/english/" 
rel=external>English</A>-<A 
href="javascript:navigate('mai'%20+%20'lto:'%20+%20'webm'%20+%20'aster@c'%20+%20'sdn.n'+'et?subject=向CSDN报告问题')" 
rel=external>问题报告</A></DIV>
<DIV>北京百联美达美数码科技有限公司&nbsp;&nbsp;版权所有&nbsp;&nbsp;京 ICP 证 020026 号</DIV>
<DIV>Copyright © 2000-2006, CSDN.NET, All Rights Reserved</DIV>
<SCRIPT 
src="高手啊,,帮我将这个C程序改写DELPHI吧。有难度的。有关PDU转码的问题 Delphi - Windows SDK-API - CSDN社区 community_csdn_net.files/counter.js" 
type=text/javascript></SCRIPT>

<SCRIPT 
src="高手啊,,帮我将这个C程序改写DELPHI吧。有难度的。有关PDU转码的问题 Delphi - Windows SDK-API - CSDN社区 community_csdn_net.files/jsframework.js" 
type=text/javascript></SCRIPT>

<SCRIPT type=text/javascript>/*<![CDATA[*/Include("Csdn.IM.NoticeWindow");/*]]>*/</SCRIPT>

<HR>
</DIV></DIV></DIV></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -