cab file transfer using http

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()
 
C

chalie tomson

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? ^^
 
C

chalie

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? ^^
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top