Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. CRC Calculation [modified]

CRC Calculation [modified]

Scheduled Pinned Locked Moved Visual Basic
htmlcomquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MatthysDT
    wrote on last edited by
    #1

    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

    C 1 Reply Last reply
    0
    • M MatthysDT

      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

      C Offline
      C Offline
      Chinners
      wrote on last edited by
      #2

      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?

      M 2 Replies Last reply
      0
      • C Chinners

        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?

        M Offline
        M Offline
        MatthysDT
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        • C Chinners

          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?

          M Offline
          M Offline
          MatthysDT
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups