Click here to Skip to main content
15,888,521 members
Please Sign up or sign in to vote.
1.00/5 (5 votes)
See more:
C
unsigned char Bcc;
unsigned char BerekenBcc( char *str, int len)
{
	inti,dat,f;

	for(Bcc=0;len,len--)
	{

		dat=*str++;
		data=data & 0xff;

		for(i=0;i<8;++i)
		{
			f=i & (data^Bcc);
			Bcc=(unsigned char) (Bcc >> 1);
			data= data >>1;
			if(f)Bcc=(unsigned char) (Bcc0x8c);
		}
	}
	return(Bcc);
}
Posted
Updated 11-Jan-16 4:27am
v2
Comments
ZurdoDev 11-Jan-16 9:01am    
You want someone to re-write this code in three different languages for you? That's not very appropriate.
Jochen Arndt 11-Jan-16 9:14am    
That is impossible even if someone would want do it for you because the posted code would not compile (some characters and the definition of data seems to get lost during copy and paste).

1 solution

in VB you have the data type byte for such manipulations. Take a look at this explanation.

For Vb.net and C# are tailor made buffer classes. Microsoft provides some interesting example code.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900