PDA

Click to See Complete Forum and Search --> : HTTP Download?


nukem996
Dec 29th, 2000, 10:07 PM
Ive been working on some code to download threw HTTP. And it crashs the computer when I download big files. Can some one plz help me!?!?!?!?!?
Code:

Public Function DownloadFile(URL As String, _
LocalFilename As String) As Boolean

Dim lngRetVal As Long

lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0)

If lngRetVal = 0 Then DownloadFile = True

End Function
'Declares everything
Private Declare Function URLDownloadToFile Lib "urlmon" Alias _
"URLDownloadToFileA" (ByVal pCaller As Long, _
ByVal szURL As String, _
ByVal szFileName As String, _
ByVal dwReserved As Long, _
ByVal lpfnCB As Long) As Long
Dim dl As Integer
Dim dlc As Integer