声明internetreadfile
Public Declare Function InternetReadFile Lib "wininet.dll" ( _
ByVal hFile As Long, _
ByVal sBuffer As String, _
ByVal lNumBytesToRead As Long, _
lNumberOfBytesRead As Long) As Integer
在VB中可以用上的的方法声明internetreadfile,在读取文本文件时可正常工作,但在读取
非文本文件时因为VB中的内部转换,使读取的数据发生了变化,基本上全变了。
MSDN上说可以声明成下面这样,但要为sBuffer 手工分配一段内存空间,并管理这段空
间,我没有好的方法,不知道怎么办?主要是改传一个什么类型的参数给sBuffer?
Public Declare Function InternetReadFile Lib "wininet.dll" ( _
ByVal hFile As Long, _
ByVal sBuffer As long, _
ByVal lNumBytesToRead As Long, _
lNumberOfBytesRead As Long) As Integer