在模块中声明对lib的引用:
Public 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
调用方法:
URLDownloadToFile 0, "http://www.accessgood.com/historyVersions/UMVsoftRDP_V2.5.1.462_32bit.zip", "C:\UMVsoftRDP_V2.5.1.462_32bit.zip", 0, 0
说明:
在szURL中传入下载链接,在szFileName中传入要保存的路径名称
URLDownloadToFileA帮助文档
Requirements
Pocket PC: Pocket PC 2000 and later
Smartphone: Smartphone 2002 and later
OS Versions: Windows CE 3.0 and later
Header: urlmon.h
Library: urlmon.lib