|
FastCRC Library |
Type Library |
|
FCRC16C_UpdateStr
void FCRC16C_UpdateStr( [ in,out ]long*
pCRC, [ in , string ] unsigned char* pSrc );
Parameters
pCRC
[in/out] The
crc variable.
pSrc
[in] A
null-terminated string with which to update the
crc variable.
Remarks
Updates the
crc variable
specified by pCRC with the
null-terminated string specified by pSrc. Call this function for each null-terminated string for which the
checksum is calculated. To retrieve the checksum after using
FCRC16C_UpdateStr, call
FCRC16C_Final.
Note. Before the first call to
FCRC16C_Update,
FCRC16C_UpdateStr
or
FCRC16C_Final functions, the
crc variable
must be initialized with
FCRC16C_Init.
VB Example
Private Sub MyButton_Click()
Dim strdata As String
strdata = "Hello World!"
'Initialize the crc variable to store intermediate results between function calls
Dim crcvar As Long
FCRC16C_Init crcvar
'Update the crc variable
FCRC16C_UpdateStr crcvar, strdata
'Get the checksum
Dim checksum As Long
checksum = FCRC16C_Final(crcvar)
'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
FCRC16C_Update,
FCRC16C_Final,
FCRC16C_Init,
FCRC_LongToHex16
|