cab file transfer using http

  • Thread starter Thread starter charlie tomson
  • Start date Start date
C

charlie tomson

hi..

After downloading cab file from webserver to pda
(ce.net4.1), the cabfile can't open in pda. why..
(same file works when transfer through active sync)
cab file size in pc 109k, but in pda 111k. why..

following code is used..

please let me know...

-----------------------------------------------------------
Dim objWebRequest As WebRequest
Dim objWebResponse As WebResponse
Dim objFileStream As FileStream
'Dim objBufferedStream As bufferedstream
Dim cabFileWriter As BinaryWriter
Dim cabFileReader As BinaryReader

Dim bArray(1024) As Byte
Dim fileSize As Long
Dim iRead As Integer = 1
Dim iCount As Integer

objWebRequest =
WebRequest.Create"http://211.38.77.42/tmp/cabtest.cab")

cabFileReader = New BinaryReader
(objWebResponse.GetResponseStream)
objFileStream = New FileStream
("\temp\cabtest.cab",FileMode.OpenOrCreate,FileAccess.Write
)

fileSize = objWebResponse.ContentLength()

While iRead > 0
iRead = cabFileReader.Read(bArray, 0, bArray.Length)
objFileStream.Write(bArray, 0, bArray.Length)
End While

MsgBox("download completed")
cabFileReader.Close()
objFileStream.Close()
 
thanks useful advice..
but it is same after remending...
i wonder cabfile downloaded from http to pda doesn't matter
to explode comparing active sync moving.


any other idea? ^^
 
it's work! don't care
thanks
-----Original Message-----
thanks useful advice..
but it is same after remending...
i wonder cabfile downloaded from http to pda doesn't matter
to explode comparing active sync moving.


any other idea? ^^
.
 
Back
Top