当前位置: 首页 > 图文教程 > 网络编程 > ASP.NET > VB PDU mode 7 bit 解码

ASP.NET
十天学会ASP.net之第二天
十天学会ASP.net之第四天
十天学会ASP.net之第五天
十天学会ASP.net之第六天
十天学会ASP.net之第七天
十天学会ASP.net之第八天
十天学会ASP.net之第九天
十天学会ASP.net之第十天
在.net中Oracle日期类型的处理
ASP.Net的6大焦点问题
关于Web站点不同,共享Session的问题
判断浏览器是否接受Cookies
DataGrid的多行提交
C#中连接两个DataTable,相当于Sql的InnerJoin
ASP.Net常用功能整理--生成图片的缩略图
在程序中书写SQL语句
正则表达式的3种匹配模式
ASP.NET的高级调试技巧
基于C#的接口基础教程之七
ASP.NET对IIS中的虚拟目录进行操作

ASP.NET 中的 VB PDU mode 7 bit 解码


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 53 ::
收藏到网摘: n/a


Dim tep As String
Dim temp As String
Dim i As Integer
Dim B As Integer
Dim rems As String
tep = rmsg
i = Len(tep)
If i < 1 Then Exit Function

B = i / 2

If i = B * 2 Then
tep = Left(tep, B * 2)
Else
B = B - 1
tep = Left(tep, B * 2)
End If

chg7 = ""
rems = ""
Dim trint As Integer
Dim strtmp As String

trint = 1
strtmp = ""
For i = 1 To B
temp = "&H" & Mid(tep, (i - 1) * 2 + 1, 2)
temp = D_To_B(Val(temp)) '转二进制

If Len(temp) < 8 Then
temp = strpla(8 - Len(temp)) + temp
End If

strtmp = Mid(temp, trint + 1, 8 - trint) + rems

rems = Mid(temp, 1, trint)


chg7 = chg7 & ChrW(CInt(Val(B_To_D(strtmp))))

trint = trint + 1
If trint = 8 Then
trint = 1
chg7 = chg7 & ChrW(CInt(Val(B_To_D(rems))))
rems = ""
End If


Next i