Tools Links Login

Ghost A Download

This code downloads anything off the internet without popping up a dialog box of any sort. Very simple to use. Vote if ya wanna.

Original Author: CovertLoop

Inputs

Don't forget about the declarations.

Assumptions

Don't forget about the declarations.

Returns

Don't forget about the declarations.

Side Effects

Don't forget about the declarations.

API Declarations

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
Public Function DownloadFile(URL As String, _
LocalFilename As String) As Boolean
Dim lngRetVal As Long
lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0)
If lngRetVal = 0 Then DownloadFile = True
End Function

Code

G = DownloadFile("UrlOfTheFileToDownload", "c:windowsdesktopFileName.htm")

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 78 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.