Hey, im having problems with my inet download function, it downloads fine for sizes like 2mb but gives me "out of memory" error for sizes like 100mb. How can i fix this?
Code:Private Function DLFile(FileName As String) Dim bytes() As Byte Dim fnum As Integer Dim FullName As String Dim found As Boolean Dim i As Long found = False For i = Len(FileName) To 1 Step -1 If Mid(FileName, i, 1) = "/" And found = False Then FullName = Dir1.Path + Mid(FileName, i + 1, Len(FileName) - i) found = True End If Next i DoEvents bytes() = Inet1.OpenURL( _ FileName, icByteArray) fnum = FreeFile Open FullName For Binary Access Write As #fnum Put #fnum, , bytes() Close #fnum End Function




Reply With Quote