Welcome to the Xceed Community | Help
Community Search  

Using SCO to calculate a CRC from ASP

Sort Posts: Previous Next
  •  05-12-2005, 9:53 AM Post no. 6248

    Using SCO to calculate a CRC from ASP

    I'm trying to use the streaming compression library to calculate the CRC-32 value of a file.

    From what I understand, the .Readfile method should be able to do that. However it doesn't return any value.

    The method is returning the correct number of bytes read, but just no CRC value. According to the docs, "When the eAction parameter is specified as cfpCalculateCRC32 or cfpCalculareAdler32, the ReadFile method returns a long integer variant containing the computed checksum value."

    Here's my code (of course I am passing an actual license key, and .License returns true)

    I have also tried assigning a compression method object to the .CompressionMethod just in case, but it made no difference.

    Am I doing something wrong, or is this a bug?

    Dim xComp
    Dim lngCRC
    Dim lngBytesRead

    lngCRC = 0

    Set xComp = Server.CreateObject("Xceed.StreamingCompression")
    Call xComp.License( "license key" )

    lngCRC = xComp.ReadFile(Server.MapPath("testfile.txt"), 0, 0, 2, True, lngBytesRead)

    Response.write "Bytes read: " & lngBytesRead & "<br/>"
    Response.write "CRC: " & lngCRC & "<br/>"
  •  05-12-2005, 8:02 PM Post no. 6249 in reply to 6248

    Re: Using SCO to calculate a CRC from ASP

    That's a known problem that should be fixed next update (end of May I believe).
  •  05-12-2005, 8:09 PM Post no. 6250 in reply to 6249

    Re: Using SCO to calculate a CRC from ASP

    That's a big bug! Is it just from VBScript or from all languages?

    Anyway I decided to use MD5 instead using this free component:
    http://www.xstandard.com/page.asp?p=44AFBB03-EDC1-49FE-94CC-333AE728331E

    Although I would prefer to use an Xceed product. Do any of the Xceed products support calculation of MD5 checksums from a file?

    Thanks
    Ben
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2008 Xceed Software Inc.