| 发表于:2007-04-22 16:30:322楼 得分:5 |
private sub command1_click() msgbox hex2string( "d1 a9 d2 b8 ce de c9 f9 ") end sub private function hex2string(byval shex as string, optional bunicode as boolean) dim sbyte as variant dim bychar() as byte dim i as long shex = replace(shex, vbcrlf, " ") sbyte = split(shex, " ") redim bychar(0 to ubound(sbyte)) as byte for i = 0 to ubound(sbyte) bychar(i) = val( "&h " & sbyte(i)) next if bunicode then hex2string = bychar else hex2string = strconv(bychar, vbunicode) end if end function | | |
|