知道服务器的地址、用户名、密码、INI文件的完整路径,要读这个INI文件的内容
读本机的文件我用的是API GetPrivateProfileString,读服务器上的就不行,连上服务器后想把服务器上的文件夹下载到本机,又该怎么做呢?请高人赐教!

解决方案 »

  1.   

    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 LongFunction 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