Advertisement
Java_Volume1 Internet/ HTML #97798

Download File from Net

Downloads a file to the host's computer from the internet via api.

AI

Yapay Zeka Özeti: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Kaynak Kod
original-source
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
Private Sub Form_Load()
  DownloadFile "http://www.ksnet.co.uk", "c:\KSNET.htm"
End Sub
Orijinal Yorumlar (3)
Wayback Machine'den kurtarıldı