Can you fix this?

  • Thread starter Thread starter Craig Hardcastle
  • Start date Start date
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.
 
By how much difference is the size? half?


-----------------------------------------------
Brian Cross
Software Developer
Mobile Devices Product Group

This posting is provided "AS IS" with no warranties and confers no rights.
 
Back
Top