|
-
Nov 4th, 2000, 11:02 AM
#1
Thread Starter
Junior Member
Hey all, i'm using the Winsock API to download a zip file from my website that's roughly 200 Kb. Is there anyway I can create a big enough buffer string to download the data into?? Below is what i've got but it doesn't work. Any help is greatly appreciated!
WINSOCK RECEIVING:
Dim strBuf As String
Dim buflen As Long
strBuf = String(200000, 0)
buflen = recv(intSocket, strBuf, Len(strBuf), 0)
If buflen > -1 Then
Open App.Path & "\File.zip" For Binary Access Write As #1
Put #1, , Left(strBuf, buflen)
Close 1
-
Nov 4th, 2000, 03:38 PM
#2
Hyperactive Member
http://www.vbip.com
they have good code for downloading with winsock
the server doesnt send all the file in one huge chunk anyway..u have to do soemthing like
Dim tmp as String
ws.GetData tmp
Totalrecdata = totalrecdata & tmp
but theres more to it than that, u have to check that the header has ben received, and remove header from totalrecdata, or u end up with that in the file...
buzzwords are the language of fools
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|