Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need sys(2007) in c#
Message
De
17/07/2014 11:40:43
 
 
À
17/07/2014 11:20:01
John Baird
Coatesville, Pennsylvanie, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 4.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01603909
Message ID:
01603919
Vues:
40
thanks for the c++ - I'm trying to convert it to c# and there are no pointers in C# so it's causing me some difficulty

does anyone have any ideas how to convert this method to c#?

LOCAL void CalcCkSum(void *ptr, long cb)
{
long cktemp = 0;
long cl = cb >> 2;
long *lp = (long *) ptr;
TEXT *cp;


while(cl--)
cktemp ^= *lp++;
cl = cb & 3; // Any remainder?
cp = (TEXT *)lp;
while(cl--)
cktemp ^= *cp++;


ObjectCheckSum ^= cktemp;
ObjectCheckSum ^= cktemp >> 8;
ObjectCheckSum ^= cktemp >> 16;
ObjectCheckSum ^= cktemp >> 24;
}

http://computer-programming-forum.com/2-vfp/ac93d844790b80c7.htm
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform