VB6.0怎样把16BIT数据转为ASCII码
各位前辈请教一下VB6中怎样把16Bit数据转为ASCII码?如下图所示
D12500个16Bit数据,值为16717
上图为转为ASCII码,值变为MA
请教给位大哥怎样用VB6.0写出来啊??
[解决办法]
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
Private Sub Command1_Click()
Dim Bin As Integer, tmp(0 To 1) As Byte, s As String
Bin = 16717
CopyMemory tmp(0), Bin, 2
s = StrConv(tmp, vbUnicode)
Debug.Print s
End Sub