Results 1 to 2 of 2

Thread: download larger files in vb

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2008
    Posts
    75

    download larger files in vb

    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

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: download larger files in vb

    Moved From The CodeBank

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width