Click here to Skip to main content
15,920,708 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Advice on where to start Pin
Bob Stanneveld8-Nov-05 5:54
Bob Stanneveld8-Nov-05 5:54 
GeneralRe: Advice on where to start Pin
Chris Losinger8-Nov-05 5:59
professionalChris Losinger8-Nov-05 5:59 
GeneralRe: Advice on where to start Pin
cRaCKh0rN8-Nov-05 10:08
cRaCKh0rN8-Nov-05 10:08 
AnswerRe: Advice on where to start Pin
LighthouseJ8-Nov-05 19:43
LighthouseJ8-Nov-05 19:43 
QuestionBeginner Programmer, Got some ideas for me? Pin
Monkey De Lufy: Pirate King8-Nov-05 4:47
Monkey De Lufy: Pirate King8-Nov-05 4:47 
AnswerRe: Beginner Programmer, Got some ideas for me? Pin
David Crow8-Nov-05 4:50
David Crow8-Nov-05 4:50 
QuestionDataGrid Pin
rsw18-Nov-05 4:38
rsw18-Nov-05 4:38 
QuestionCRC-16 Convert to vb.Net Pin
RichardBerry8-Nov-05 4:33
RichardBerry8-Nov-05 4:33 
Hi

Please could someone help me to convert the following to Visual Basic.. It is a CRC16 algorithm using the polynomial (x16 + x15 + x2 + 1) used for very short strings.

Tks

Richard

static unsigned BitsSet (unsigned char ch)
{
unsigned n;
n = 0;
while (ch)
{
n += (ch & 1);
ch >>= 1;
}
return(n);
}

unsigned CRCof (const char *message, unsigned len)
{
unsigned i;
unsigned crc;
unsigned char k;

crc = 0;
for (i=0; i<len; i++)
{
k = (unsigned char)(message[i]) ^ crc; crc = (crc / 256) ^ (k*128) ^(k*64);
if ((BitsSet(k) & 1) != 0)
crc ^= 0xC001;
}
return(crc);
}
Questionshowing a bitmap on a CStatic in a toolbar Pin
Mircea Grelus8-Nov-05 4:33
Mircea Grelus8-Nov-05 4:33 
Questionvirtual detstruct question when multi derived Pin
followait8-Nov-05 4:23
followait8-Nov-05 4:23 
AnswerRe: virtual detstruct question when multi derived Pin
toxcct8-Nov-05 4:34
toxcct8-Nov-05 4:34 
QuestionRe: virtual detstruct question when multi derived Pin
Bob Stanneveld8-Nov-05 5:51
Bob Stanneveld8-Nov-05 5:51 
AnswerRe: virtual detstruct question when multi derived Pin
Maximilien8-Nov-05 6:40
Maximilien8-Nov-05 6:40 
GeneralRe: virtual detstruct question when multi derived Pin
Bob Stanneveld8-Nov-05 21:57
Bob Stanneveld8-Nov-05 21:57 
AnswerRe: virtual detstruct question when multi derived Pin
toxcct8-Nov-05 6:58
toxcct8-Nov-05 6:58 
GeneralRe: virtual detstruct question when multi derived Pin
Bob Stanneveld8-Nov-05 21:53
Bob Stanneveld8-Nov-05 21:53 
AnswerRe: virtual detstruct question when multi derived Pin
followait8-Nov-05 15:03
followait8-Nov-05 15:03 
GeneralRe: virtual detstruct question when multi derived Pin
Bob Stanneveld8-Nov-05 21:52
Bob Stanneveld8-Nov-05 21:52 
GeneralRe: virtual detstruct question when multi derived Pin
Blake Miller9-Nov-05 5:43
Blake Miller9-Nov-05 5:43 
QuestionCRC-16 Convert to vb.Net Pin
RichardBerry8-Nov-05 3:55
RichardBerry8-Nov-05 3:55 
Questionclicking the titlebar Pin
bonosa8-Nov-05 3:54
bonosa8-Nov-05 3:54 
AnswerRe: clicking the titlebar Pin
Rage8-Nov-05 4:03
professionalRage8-Nov-05 4:03 
QuestionSetWindowText Problem in Release Version Pin
LittleYellowBird8-Nov-05 3:38
LittleYellowBird8-Nov-05 3:38 
AnswerRe: SetWindowText Problem in Release Version Pin
toxcct8-Nov-05 3:57
toxcct8-Nov-05 3:57 
GeneralRe: SetWindowText Problem in Release Version Pin
LittleYellowBird8-Nov-05 4:29
LittleYellowBird8-Nov-05 4:29 

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.