Open "d:\523741.fig" For Binary As 1
n = LOF(1)
ReDim arrBytes(1 To n) As Byte
Get 1, , arrBytes
Close 1
我想把arrBytes(1),(2),(3),(4)连成一个双字,怎么实现呢
n = LOF(1)
ReDim arrBytes(1 To n) As Byte
Get 1, , arrBytes
Close 1
我想把arrBytes(1),(2),(3),(4)连成一个双字,怎么实现呢
只有Byte是无符号的
allbyte = allbyte & arrBytes(i)
next i
arrBytes(1)=&H00
arrBytes(2)=&H07
我想连接以后变成00 07,然后再把它转化成整数
用copymemory好像顺序反了
我的用法是:
Dim intNum As Long
CopyMemory intNum, arrBytes(1), 2
但是它的连接是倒起来的,即:07 00,应该怎么来转换呢?
dim arrstr(3) byte
arrstr(0) = arrBytes(1)
..
arrstr(3) =arrBytes(4)debug.print CSTR(arrstr)