Solved
Send Byte Array
Posted on 2004-09-21
I need to send a byte array over winsock.
This is what it looks like...
ReDim Bits(0 To 3, 0 To bmWidth - 1, 0 To bmHeight - 1) As Byte
GetBitmapBits Picture1.Image, bmSize, Bits(0, 0, 0)
For Y = 0 To bmHeight - 1
For X = 0 To bmWidth - 1
Bits(2, X, Y) = Bits(2, X, Y) 'Red Bits
Bits(1, X, Y) = Bits(1, X, Y) 'Green Bits
Bits(0, X, Y) = Bits(0, X, Y) 'Blue Bits
Next X
Next Y
...
Now how do I send Bits(0, 0, 0) through winsock??? I'm thinking Bits(0, 0, 0) contains alot of information but when I look to see what it is all it says is 128. I know it contains more than that. So whats the easyest way to send it through winsock? Also can someone please explain how byte arrays work, I see them all the time but I cant figure out how to use them. Thanks.