ADODB.Stream 二进制读取到的数据怎样放到byte数组中,该怎么解决
ADODB.Stream 二进制读取到的数据怎样放到byte数组中
这样写不正确,说类型不匹配,请问怎样放到byte数组中呢?谢谢!
------解决方案--------------------
通过Stream实现图片存取
------解决方案--------------------
- VB code
Dim a(2) As Variant Dim ado As New ADODB.Stream ado.Type = 1 ado.Open ado.LoadFromFile "d:\1.tmp" a(0) = ado.read(1) a(1) = ado.read(1) a(2) = ado.read(1) Dim b(2) As Byte b(0) = a(0) b(1) = a(1) b(2) = a(2)
这样写不正确,说类型不匹配,请问怎样放到byte数组中呢?谢谢!
------解决方案--------------------
通过Stream实现图片存取
------解决方案--------------------
- VB code
Dim ado As New ADODB.Stream ado.Type = 1 ado.Open ado.LoadFromFile "d:\1.tmp" Dim b() As Byte b = ado.Read(3) Debug.Print b(0), b(1), b(2)