我在使用ActiveX时遇到错误,例如无法使用ado.stream
。
我试过搜索但是除了ado.stream
之外我找不到任何东西来读取vbscript中的二进制文件
dim FileName
dim resstring
Function ReadBinaryFile(FileName)
Const adTypeBinary = 1
Dim BinaryStream
Set BinaryStream = CreateObject("ADODB.Stream")
BinaryStream.Type = adTypeBinary
BinaryStream.Open
BinaryStream.LoadFromFile FileName
ReadBinaryFile = BinaryStream.Read
End Function
并在下面调用 resstring = ReadBinaryFile(" C:\ Documents and Settings \ mahesh \ Desktop \ img.iso")