Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CRC32 returns negative on big files
Message
De
31/07/2011 11:20:56
 
 
À
31/07/2011 05:29:17
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01519635
Message ID:
01519741
Vues:
27
>>>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

IIRC you can't do that cast in VB (although you can in C# using 'unchecked')
>
>(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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform