Hi guys,
I'm sure this is easy for you lot, but I'm having trouble finding a solution.
I have a CRC32 calculation I wrote in C and am now porting it to VB, but storing the values as Long or Currency doesn't seem to help. When I use long values it treats the value as signed which messes things up in the divide etc, and when I use Currency I get overflow errors.
The calc is below:
CRCTable is an array of Unsigned Long values which I've inserted as &H values.Code:Function crc(a As Long, b As Long) as long Dim p1, p2 As Long p1 = ((a) Xor (b)) p1 = p1 And &HFF p2 = ((a) / 256) crc = CrcTable(p1) Xor p2 End Function
I'd appreciate any help with this, as I'm sure there must be a work around.
Thanks




Reply With Quote