Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CRC32 returns negative on big files
Message
From
31/07/2011 05:29:17
 
 
To
30/07/2011 13:50:53
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01519635
Message ID:
01519729
Views:
37
>>That means that the leftmost bit is set
>>
>>Did you try UInteger instead of Integer data type ?
>>
>>UInteger cannot be negative http://msdn.microsoft.com/en-us/library/x79h55x9(VS.80).aspx
>
>There is a lot of Integer declarations in there. Which one specifically should I try that adjustment on?


(1) The short way is to cast the return result to UInteger, and change the return type of GetCrc32() to UInteger

(2) A bit more work is to change everything that is involved in the result to UInteger

At first glance
class level
- nCRC32
- nCRC32Table


in Initialize()
- lnDWPolynomial
- lnDWCRC

in GetCrc32()
- lnCRC32Result
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform