Help.
I am struggling to convert this piece of C code to VB.
#define updcrc(d,s) (crctab[((s >> 8) & 0xff)] ^ (s << 8) ^ d)
This is what I have so far
Public Sub UpdCRC(Char As Integer, Sum As Long)
Sum = m_lCRCTable(ShiftRight(Sum, 8) And 255) Xor (ShiftLeft(Sum, 8)) Xor Char
End Sub
Private Function ShiftLeft(Word As Long, Bits As Integer) As Long
ShiftLeft = (Word * (2 ^ Bits)) And 65535
End Function
Private Function ShiftRight(Word As Long, Bits As Integer) As Long
ShiftRight = (Word / (2 ^ Bits)) And 65535
End Function
Can anybody help ???
