Click here to Skip to main content
15,889,116 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Paging in Datagrids Pin
Henry Minute7-Apr-09 0:56
Henry Minute7-Apr-09 0:56 
GeneralRe: Paging in Datagrids Pin
parkash_C7-Apr-09 1:40
parkash_C7-Apr-09 1:40 
GeneralRe: Paging in Datagrids Pin
Henry Minute7-Apr-09 1:48
Henry Minute7-Apr-09 1:48 
Questionvb and flash Pin
ahlamissa6-Apr-09 2:38
ahlamissa6-Apr-09 2:38 
AnswerRe: vb and flash Pin
Dave Kreskowiak6-Apr-09 10:45
mveDave Kreskowiak6-Apr-09 10:45 
AnswerRe: vb and flash Pin
Christian Graus6-Apr-09 16:58
protectorChristian Graus6-Apr-09 16:58 
AnswerRe: vb and flash Pin
Anubhava Dimri6-Apr-09 21:50
Anubhava Dimri6-Apr-09 21:50 
Questionurgent: vb6 code to calculate 16 bit CRC-CCITT Pin
singende6-Apr-09 2:15
singende6-Apr-09 2:15 
please help i need a visual basic 6 conversion or equivalence of the below code
i tried several codes but i am getting different results

urgently in need of help



/*************************************************************************
Function: 16 bit CRC-CCITT calculation
--------------------------------------------------------------------------
Call: calc_crc(unsigned short crc_buff, unsigned char input)
--------------------------------------------------------------------------
Response: Newly calculated 16 bit CRC checksum
--------------------------------------------------------------------------
Description: Calculates the checksum for 'input' in accordance with the CRC polynomial x^16 + x^12 + x^5 + 1. 'crc_buff' is the previously calculated checksum. This must be set to 0xFFFF at the beginning of a test sequence.
*************************************************************************/
unsigned short calc_crc(unsigned short crc_buff, unsigned char input)
{
unsigned char i;
unsigned short x16; // we’ll use this to hold the XOR mask
for (i=0; i<8; i++)
{
// XOR current D0 and next input bit to determine x16 value
if( (crc_buff & 0x0001) ^ (input & 0x01) )
x16 = 0x8408;
else
x16 = 0x0000;
// shift crc buffer
crc_buff = crc_buff >> 1;
// XOR in the x16 value
crc_buff ^= x16;
// shift input for next iteration
input = input >> 1;
}
return(crc_buff);
}
File: UMB-Protokoll 1_0 Version 1_5_e.doc,
Version 1.5,
Status 14.12.2007
37
// ******************* MAIN ************************************
void main(void)
{
// example: CRC for 8 Bytes
unsigned char values[8] =
{0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37};
// initialise startvalue FFFFh
unsigned short crc = 0xFFFF;
// calculation
for(int n = 0; n < 8; n++)
{
crc = calc_crc(crc, values[n]);
}
// output
printf("\ndata: 30h, 31h, 32h, 33h, 34h, 35h, 36h, 37h");
printf("\nCRC: %04Xh\n", crc);
}
AnswerRe: urgent: vb6 code to calculate 16 bit CRC-CCITT Pin
Jay Royall6-Apr-09 2:24
Jay Royall6-Apr-09 2:24 
AnswerRe: urgent: vb6 code to calculate 16 bit CRC-CCITT Pin
CPallini6-Apr-09 3:32
mveCPallini6-Apr-09 3:32 
GeneralRe: urgent: vb6 code to calculate 16 bit CRC-CCITT Pin
singende6-Apr-09 4:08
singende6-Apr-09 4:08 
GeneralRe: urgent: vb6 code to calculate 16 bit CRC-CCITT Pin
0x3c06-Apr-09 4:11
0x3c06-Apr-09 4:11 
GeneralRe: urgent: vb6 code to calculate 16 bit CRC-CCITT Pin
CPallini6-Apr-09 5:01
mveCPallini6-Apr-09 5:01 
GeneralRe: urgent: vb6 code to calculate 16 bit CRC-CCITT Pin
0x3c06-Apr-09 5:53
0x3c06-Apr-09 5:53 
GeneralRe: urgent: vb6 code to calculate 16 bit CRC-CCITT Pin
CPallini6-Apr-09 10:44
mveCPallini6-Apr-09 10:44 
GeneralRe: urgent: vb6 code to calculate 16 bit CRC-CCITT Pin
0x3c06-Apr-09 23:24
0x3c06-Apr-09 23:24 
GeneralRe: urgent: vb6 code to calculate 16 bit CRC-CCITT Pin
CPallini6-Apr-09 23:31
mveCPallini6-Apr-09 23:31 
GeneralRe: urgent: vb6 code to calculate 16 bit CRC-CCITT Pin
0x3c07-Apr-09 1:36
0x3c07-Apr-09 1:36 
GeneralRe: urgent: vb6 code to calculate 16 bit CRC-CCITT Pin
CPallini7-Apr-09 1:48
mveCPallini7-Apr-09 1:48 
GeneralRe: urgent: vb6 code to calculate 16 bit CRC-CCITT Pin
singende6-Apr-09 5:11
singende6-Apr-09 5:11 
GeneralRe: urgent: vb6 code to calculate 16 bit CRC-CCITT Pin
Vimalsoft(Pty) Ltd6-Apr-09 21:05
professionalVimalsoft(Pty) Ltd6-Apr-09 21:05 
GeneralRe: urgent: vb6 code to calculate 16 bit CRC-CCITT Pin
Dave Kreskowiak6-Apr-09 10:43
mveDave Kreskowiak6-Apr-09 10:43 
JokeRe: urgent: vb6 code to calculate 16 bit CRC-CCITT Pin
CPallini6-Apr-09 10:46
mveCPallini6-Apr-09 10:46 
AnswerRe: urgent: vb6 code to calculate 16 bit CRC-CCITT Pin
Christian Graus6-Apr-09 16:59
protectorChristian Graus6-Apr-09 16:59 
GeneralRe: urgent: vb6 code to calculate 16 bit CRC-CCITT Pin
DaveyM697-Apr-09 0:37
professionalDaveyM697-Apr-09 0:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.