I'm working on an app that retreives data through a modem. Since my tests show I'm getting some errors, I'd like to use the remote system's interactive capabilities, which sends a CRC-16 checksum after the message and waits for confirmation before proceeding.
My problem is, I'm at a loss as to how to implement the CRC algorithm in VB. The algorithm involves lots of bit shifting, which is easy enough in C, but I have no idea how to do it in VB.
I considered converting the data to a string or 1's and 0's which I could manipulate, but besides being a big pain, I'm not sure it would be feasible in terms of speed.
So what should I do? Has anyone ever seen a CRC-16 implementation in VB? How would one handle the bit shifting? Is there some kind of shift function in VB? Can someone suggest a way to simulate it?
My problem is, I'm at a loss as to how to implement the CRC algorithm in VB. The algorithm involves lots of bit shifting, which is easy enough in C, but I have no idea how to do it in VB.
I considered converting the data to a string or 1's and 0's which I could manipulate, but besides being a big pain, I'm not sure it would be feasible in terms of speed.
So what should I do? Has anyone ever seen a CRC-16 implementation in VB? How would one handle the bit shifting? Is there some kind of shift function in VB? Can someone suggest a way to simulate it?