Im trying duplicate a program that sends a checksum at end of string, I got the code from original program in C, don't quite understand what they are doing, Im a VB programmer,, I know very little about C. here is the code.

// Convert to HEX and then
// take the last digits of our HEX value (should be two)
CString sCheckSum;
sCheckSum.Format(_T("%0*X"), iChecksumLength, iCheckSum);
if(sCheckSum.GetLength() > iChecksumLength)
{
sCheckSum = sCheckSum.Right(iChecksumLength);
}
return sCheckSum;