Hello,
I need to transfer pictures to a VB6 Application via winsock (encrypted before).
With the wllknown methods I get a byte() Array that is UTF8 encodet.
How can I read the raw bytes of a file (Picture) and put it in a long string to transfer it?
Dim data() As Byte = File.ReadBytes(path, filename)
Dim Bconv As ByteConverter
datastring = Bconv.HexFromBytes(data)
VB6 Code:
file_content = Hex2Ascii(input)
Function Hex2Ascii(Hcs As String) As String
Dim l As Long
Dim a As Long
l = Len(Hcs)
For a = 1 To l Step 2
Hex2Ascii = Hex2Ascii & Chr$(Val("&H" & Mid(Hcs, a, 2)))
Next
End Function