• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 321
  • Last Modified:

downloading file from http in vb6

hello
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




0
yogesh28577
Asked:
yogesh28577
  • 2
1 Solution
 
Frosty555Commented:
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.
0
 
Frosty555Commented:
Here is the ugly but complete MSDN reference to WinInet:
    http://msdn2.microsoft.com/en-us/library/aa385483.aspx

Ah! And here is an example from AllAPI.net

http://allapi.mentalis.org/apilist/InternetOpenUrl.shtml

Click the "WinINet" example
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now