CRC Calculation [modified]
-
I am modifying a driver (DLL) that is written in VB6. One of the modifications requires me to do a checksum check on all received data. Here is the CRC Calculation Specification[^] which is unfortunately Greek to me (and seems to CP members also from the response I've been getting :rolleyes: ). Mostly because my C coding knowledge is almost NULL and my ASM is very rusted. The resulting CRC value is a string of 4 hexadecimals e.g. "1BF2". How should I go about doing this in VB6? Kind Regards
A treat for all down voters...[^] "you can't forget something you never knew..." M. Du Toit
modified on Tuesday, July 8, 2008 9:21 AM
-
I am modifying a driver (DLL) that is written in VB6. One of the modifications requires me to do a checksum check on all received data. Here is the CRC Calculation Specification[^] which is unfortunately Greek to me (and seems to CP members also from the response I've been getting :rolleyes: ). Mostly because my C coding knowledge is almost NULL and my ASM is very rusted. The resulting CRC value is a string of 4 hexadecimals e.g. "1BF2". How should I go about doing this in VB6? Kind Regards
A treat for all down voters...[^] "you can't forget something you never knew..." M. Du Toit
modified on Tuesday, July 8, 2008 9:21 AM
I want to downvote you just to see what the treat is! Anyway, looking at what your result is, you are looking at a CRC16 value. The code here: http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=12638&lngWId=1[^] can calculate CRC32 or CRC16 values. I havent used it, instead I struggled with the C implementation to make a .NET specific CRC32 (which isnt much use to you!) Hope the link helps?
-
I want to downvote you just to see what the treat is! Anyway, looking at what your result is, you are looking at a CRC16 value. The code here: http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=12638&lngWId=1[^] can calculate CRC32 or CRC16 values. I havent used it, instead I struggled with the C implementation to make a .NET specific CRC32 (which isnt much use to you!) Hope the link helps?
Jasey9 wrote:
I want to downvote you just to see what the treat is!
Feel free to do so, :laugh: I only put that there for some of those fiercely territorial CP members that have nothing better to do than hang around in the Lounge all day and criticize other people's posts, they really get under my skin! Anyway, thanks for the code, at least now I now what I'm looking at (CRC16), I'm going to give it a shot tomorrow and let you know! Thanks again!!
A treat for all down voters...[^] "you can't forget something you never knew..." M. Du Toit
-
I want to downvote you just to see what the treat is! Anyway, looking at what your result is, you are looking at a CRC16 value. The code here: http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=12638&lngWId=1[^] can calculate CRC32 or CRC16 values. I havent used it, instead I struggled with the C implementation to make a .NET specific CRC32 (which isnt much use to you!) Hope the link helps?
Hi There The code didn't work but with some tweaking and re-inventing the square vb6 wheel we got a working Checksum calculator which worked with data supplied. Thanks again!!
A treat for all down voters...[^] "you can't forget something you never knew..." M. Du Toit