I am trying to download a .dat file and save it in my computer by using the URLDownloadToFile API...here is the code I have....

VB Code:
  1. Private Sub ListView1_DblClick()
  2.     On Error GoTo Resolve
  3.     Dow = URLDownloadToFile(0, "http://www.mysite.com/myfile.dat", "c:\myfile.dat", 0, 0)
  4.  
  5. Resolve:
  6.     MsgBox "File could not be downloaded", vbInformation
  7. End Sub

Please help me.....