ERRCODE BCCalcCDExtA ( t_BarCode pBarCode,
LPCSTR  lpszData,
e_CDMethod  eCDMethod,
LPSTR  lpszChecksum,
LONG *  nChecksum 
)

Calculates check-digit(s) for a given data string.

Calculates the check sum for a given data string with the given check digit method. Use this function to generate check digits independently from the adjusted bar code data. E.g. If you need a check digit only displayed in the human readable text (and not encoded in the symbol), use this function to build up your display string.

Note:
The internal bar code data is not influenced by this function. The adjusted bar code type (in pBarCode) is used to determine symbology specific check digit characteristics (use the bar code type eBCNone if you don't need this feature).

Symbology internal check sums (e.g. Mod-103 used with Code128) are not calculated with this function.

See also:
BCCalcCD(), BCSetCDMethod(), BCGetCheckDigits()
Parameters:
[in] pBarCode Pointer to barcode structure.
[in] lpszData Pointer to zero-terminated data string. No data check is performed (e.g. if a check sum method allows only digits).
[in] eCDMethod Check Digit method
[in,out] lpszChecksum Check-digit text buffer. If NULL, nChecksum returns the number of check-digits.
[in,out] nChecksum IN: Buffer size of lpszChecksum, OUT: number of generated check digits (-1 if buffer size is to small).
Return values:
ERRCODE ErrOk (0) in case of success. Non-zero if check digit generation failed.


© 2008 All rights reserved by TEC-IT Datenverarbeitung GmbH
Generated on Tue May 5 15:50:33 2009 for TEC-IT TBarCode Library 9.2 with doxygen 1.5.3