downloading file from http in vb6

Posted on 2007-10-10
Last Modified: 2012-06-27
i devloped Asp script on server which give me Url,filesize
i want to use url as file path & file size for progress bar
now i want to develop function which download file  & show progress bar
but my problem is i don't want to use Inet Control i search interNet Api  which direct copy entire file i want copy file line by line or char by char
plz tell me any idea
plz note i don't want to use inet control for downloading & timer for progress control

Question by:yogesh28577
    LVL 31

    Expert Comment

    Use the WinINet API to read your file.

    You'll need to call InternetOpen() to initialize winInet
    Use the handle returend to call InternetConnet() to connet to an HTTP session.
    Use that handle with HttpOpenRequest() to open the ASP file
    Then use that handle with subsequent calls to InternetReadFile() to read it in byte by byte (or chunk by chunk).

    I'll try and find you an example somewhere.
    LVL 31

    Accepted Solution

    Here is the ugly but complete MSDN reference to WinInet:

    Ah! And here is an example from

    Click the "WinINet" example

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
    When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now