用ADO以二进制的方式取
Private Sub GetBuff()
On Error GoTo ErrEscHandle
strFileName = m_TargetFileName
intFile = FreeFile()
nBuffCnt = 0
Open strFileName For Binary Access Write As #intFile
vtData = InetAct.GetChunk(2048, icByteArray) '以二进制的方式取得文件 每次取得2048字节
Err.Clear
Do While UBound(vtData) >= 0
Put #intFile, , vtData()
vtData = InetAct.GetChunk(INET_BUFF_SIZE, icByteArray)
DoEvents
Loop
Put #intFile, , vtData() '输出到文件
Close #intFile
InetAct.Cancel
RaiseEvent onDownOver
If m_Open_File = True Then
Call FileOpen
End If
Exit Sub
ErrEscHandle:
Close #intFile
InetAct.Cancel
Call GetFile
End Sub