Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
  Database
Automation
OS/Networking
Graphics
Links
Tools
» Regular Expr Tester
» Free Tools

Download a file with one API call

Total Hit ( 2712)

Rate this article:     Poor     Excellent 

 Submit Your Question/Comment about this article

Rating


 


If you have Internet Explorer 5 or later version, you can use an API call to download a file from the Internet withouth displaying any message box.

Click here to copy the following block
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 errcode As Long
Dim url As String
Dim localFileName As String

url = "http://www.binaryworld.net/Main/Articles/Lang1/Cat288/Code3574/code3574.zip"
localFileName = "c:\code3574.zip"

errcode = URLDownloadToFile(0, url, localFileName, 0, 0)
If errcode = 0 Then
  MsgBox "Download ok"
Else
  MsgBox "Error while downloading"
End If


Submitted By : Nayan Patel  (Member Since : 5/26/2004 12:23:06 PM)

Job Description : He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting.
View all (893) submissions by this author  (Birth Date : 7/14/1981 )


Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.