TBarCode Library 11  TBarCode Library 11
ERRCODE _stdcall BCCalcCD ( t_BarCode pBarCode)

Calculates check-digit(s).

Calculates the check-digit(s) depending on all barcode parameters previously set (symbology, check digit method, bar code data). You can retrieve the calculated check sum with BCGetCheckDigits(). Do not change barcode parameters or input data after this call (if you want to generate a bar code).

Note:
You can use this function without BCCreate() to generate check sums only (based on the bar code data).
The format property and the escape sequences are not applied to the input data with this function!
This function call is optional. If a check sum is adjusted or required for a bar code, it is calculated with BCCreate() also.
Symbology internal check sums (e.g. Mod-103 used with Code128) are not calculated with this function. Such internal check sums are generated during BCCreate() without the need of user interaction.
See also:
BCSetCDMethod(), BCGetCheckDigits(), BCCalcCDExt()
Parameters:
[in]pBarCodePointer to barcode structure.
Return values:
ERRCODEErrOk (0) in case of success. Non-zero if error occurred.