|
FastCRC Library |
Type Library |
|
FCRC16_Calculate
long FCRC16_Calculate( [ in , size_is( nSrcLength
) ] const void* pSrc, [ in ] int nSrcLength );
Return value
The checksum.
Parameters
pSrc
[in] A
continuous memory block for which to calculate the checksum.
nSrcLength
[in] Length in bytes
of the memory block.
Remarks
Calculates the
checksum for the memory
block specified by pSrc.
VB Example
Private Sub MyButton_Click()
Dim strdata As String
strdata = "Hello World!"
Dim strlength As Long
strlength = Len(strdata)
'Convert the string to byte array
Dim bindata() As Byte
ReDim bindata(1 To strlength)
For i = 1 To strlength
bindata(i) = Asc(Mid(strdata, i, 1))
Next i
'Get the checksum
Dim checksum As Long
checksum = FCRC16_Calculate(bindata(1), strlength)
'Show the hexadecimal representation of the checksum
MsgBox FCRC_LongToHex16(checksum, True)
End Sub
|
|
Type Library Overview
| Type Library Functions
|
Useful Links | HashCalc
See Also
FCRC16_CalculateStr,
FCRC16_CalculateFile,
FCRC_LongToHex16
|