|
-
Oct 21st, 2022, 06:09 AM
#38
Junior Member
Re: [VB2008/.NET 3.5] Asynchronous TcpListener & TcpClient
 Originally Posted by jmcilhinney
@MHutcheon, this is the important part:
vb.net Code:
'Convert the text message to binary data.
Dim buffer As Byte() = Me.Encoding.GetBytes(message)
That is converting the String to a Byte array. You need to accept an Image and convert that to a Byte array. The thread I was referring to that demonstrates that is here:
https://www.vbforums.com/showthread....a-in-Databases
Note that, as an Image may be fairly big, you might want to write it in chunks.
Hi,
My code is stopping at this point, saying:
'Public Overrides Function GetBytes(s As String) As Byte()':
Argument matching parameter 's' cannot convert from 'Byte()' to 'String'.
and when I hover over message it is confirming for me message is a byte array - byte() - and has a length of 36167 bytes. If I read it correctly, the code is trying to convert my array back to a string? This is well beyond my level 
PS - apologies if I am straying off course here...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|