I did. It worked. But .... is ..... very .... slow .....
In Release mode?
Im not getting anywhere with this. am I correct to say if the length of the string is Len(senddata) = 603 Then the prefix would be chr(93) & chr(2) & chr(0) & chr(0) ?
please advice I'm lost
Looking at the code I linked to in post #18, as long as Len(senddata) returns a Int32 value, you should just Write(Len(senddata)).
Code snippet from linked code:
Dim name As Byte() = Encoding.UTF8.GetBytes(Path.GetFileName(fileToSend))
Dim bw As New BinaryWriter(stream)
'send the first message which is the file name
bw.Write(name.Length)
bw.Write(name)
Instead of a filename, you just need to sent your UTF8 encoded string, so something like
Dim myTextToSent = "Some really really long string here"
Dim data As Byte() = Encoding.UTF8.GetBytes(myTextToSent)
Dim bw As New BinaryWriter(stream)
'send the first message which is the file name
bw.Write(data.Length)
bw.Write(data)
Note: This is just a code snippet. You still need to set up the "stream" variable/object. I'm not a VB6 programmer, I'm just going by the code provided (linked to in post#18).