C
Craig Hardcastle
hi, im trying to send an image to a remote pc from my pda. the code
below almost works but the size of the data received on the remote pc
is not correct. can anyone point out where im going wrong?
Dim TempStream As New StreamReader("/My
Documents/Personal/me_80x60_jpeg.jpg")
Dim ImageArray(TempStream.BaseStream.Length) As Byte
Dim TempArray(TempStream.BaseStream.Length) As Char
Dim l As Integer
TempStream.BaseStream.Read(ImageArray, 0,
TempStream.BaseStream.Length)
For l = 0 To TempStream.BaseStream.Length
TempArray(l) = ChrW(ImageArray(l))
Next
Dim MyVideo As New Sockets.TcpClient
MyVideo.Connect("192.168.0.5", 5557)
Dim SendPic As New StreamWriter(MyVideo.GetStream)
SendPic.Write(TempArray)
SendPic.Flush()
Thanks
Craig.
below almost works but the size of the data received on the remote pc
is not correct. can anyone point out where im going wrong?
Dim TempStream As New StreamReader("/My
Documents/Personal/me_80x60_jpeg.jpg")
Dim ImageArray(TempStream.BaseStream.Length) As Byte
Dim TempArray(TempStream.BaseStream.Length) As Char
Dim l As Integer
TempStream.BaseStream.Read(ImageArray, 0,
TempStream.BaseStream.Length)
For l = 0 To TempStream.BaseStream.Length
TempArray(l) = ChrW(ImageArray(l))
Next
Dim MyVideo As New Sockets.TcpClient
MyVideo.Connect("192.168.0.5", 5557)
Dim SendPic As New StreamWriter(MyVideo.GetStream)
SendPic.Write(TempArray)
SendPic.Flush()
Thanks
Craig.