字符串转换成十六进制
来源:岁月联盟
时间:2004-11-25
'字符串转换成十六进制
Public Function StrToHex(ByVal strS As String) As String
Dim abytS() As Byte
Dim bytTemp As Byte
Dim strTemp As String
Dim lLocation As Long
abytS = StrConv(strS, vbFromUnicode)
For lLocation = 0 To UBound(abytS)
bytTemp = abytS(lLocation)
strTemp = Hex(bytTemp)
strTemp = Right("00" & strTemp, 2)
StrToHex = StrToHex & strTemp
Next lLocation
End Function
上一篇:C#使用CDO发送邮件
下一篇:在VB中实现多线程!