Function CalcCRC(DATA(), Arraylen) As Long
Dim I, J, K, H As Integer
For I = 0 To Arraylen
J = J Xor DATA(I)
For K = 1 To 8
H = J Mod 2 'test if bit will be shifted out
J = Int(J / 2) 'shift right
If H Then
J = J Xor &H1000A001 'xor with constant
J = J - &H10000000 'clear top word
End If
Next K
Next I
CalcCRC = J
End Function
不知道是不是vb实现crc32……