checkapi.cpp File Reference


Functions

e_CDMethod BCGetCDMethod (t_BarCode* pBarCode)
 Gets the check-digit method currently in use. Returns currently adjusted value.
See also:
BCSetCDMethod() \param[in] pBarCode Pointer to barcode structure.
Return values:
eCDStandard   No value set. This is the default. TBarCode computes the standard check-digit of the symbology.
e_CDMethod   Otherwise ----------------------------------------------------------------------------.


ERRCODE BCSetCDMethod (t_BarCode* pBarCode, e_CDMethod eMethod)
 Chooses check-digit method to be used. Specifies the calculation method for the check-digit. Possible values are listed in the Barcode Reference.
The method for the check-digit calculation used by TBarCode depends on the adjusted barcode type. In order to make the product as user-friendly as possible, a standard (default) method for each barcode type is supplied. Please note that for some bar codes there is no default check digit, but using a specific method is recommended in their specification. Some symbologies have an internal check sum (e.g. Modulo-103 used with Code-128). This check sum is always part of the generated bar code - regardless what the user specifies here.
Attention:
Adjust only check-digit methods, which are allowed or recommended for a specific symbology. E.g. if a check-digit is generated, which cannot be encoded (e.g. due to limited character set of the barcode) you will get an error. Also consider that it can be necessary that the scanner configuration is adapted to the check digit.
See also:
BCGetCDMethod(), BCCalcCD() \param[in] pBarCode Pointer to barcode structure. \param[in] eMethod Check-digit method.
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.


ERRCODE 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() \param[in] pBarCode Pointer to barcode structure.
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.


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() \param[in] pBarCode Pointer to barcode structure. \param[in] lpszData Pointer to zero-terminated data string. No data check is performed (e.g. if a check sum method allows only digits). \param[in] eCDMethod Check Digit method \param[in, out] lpszChecksum Check-digit text buffer. If NULL, nChecksum returns the number of check-digits. \param[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. ----------------------------------------------------------------------------.


ERRCODE BCCalcCDExtW (t_BarCode* pBarCode, LPCWSTR lpszData, e_CDMethod eCDMethod, LPWSTR 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() \param[in] pBarCode Pointer to barcode structure. \param[in] lpszData Pointer to zero-terminated data string. No data check is performed (e.g. if a check sum method allows only digits). \param[in] eCDMethod Check Digit method \param[in, out] lpszChecksum Check-digit text buffer. If NULL, nChecksum returns the number of check-digits. \param[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. ----------------------------------------------------------------------------.


LONG BCGetCheckDigitsA (t_BarCode* pBarCode, LPSTR lpszCDText, LONG nSize)
 Returns all computed check-digits for the current barcode. Returns a string that contains all computed check-digits - in most cases 1 or 2 character(s). The string may contain unprintable characters (e.g. ASCII 0). Please note that symbology internal check sums (e.g. Mod-103 with Code-128) are not returned here. Call this function after BCCalcCD() or after BCCreate()
See also:
BCCalcCD(), BCCreate() \param[in] pBarCode Pointer to barcode structure. \param[in, out] lpszCDText Check-digit text buffer. If NULL this function returns only the number of check-digits. \param[in] nSize Buffer size of lpszCDText.
Return values:
LONG   Number of check-digits
-1   In case of error (buffer size to small) ----------------------------------------------------------------------------.


LONG BCGetCheckDigitsW (t_BarCode* pBarCode, LPWSTR lpszCDText, LONG nSize)
 Returns all computed check-digits for the current barcode. Returns a string that contains all computed check-digits - in most cases 1 or 2 character(s). The string may contain unprintable characters (e.g. ASCII 0). Please note that symbology internal check sums (e.g. Mod-103 with Code-128) are not returned here. Call this function after BCCalcCD() or after BCCreate()
See also:
BCCalcCD(), BCCreate() \param[in] pBarCode Pointer to barcode structure. \param[in, out] lpszCDText Check-digit text buffer. If NULL this function returns only the number of check-digits. \param[in] nSize Buffer size of lpszCDText.
Return values:
LONG   Number of check-digits
-1   In case of error (buffer size to small) ----------------------------------------------------------------------------.


e_CDMethod* BCGetCDListByType (e_BarCType eBCType)
 Returns the implemented check-digit methods for a barcode symbology. Returns an array of implemented check-digit methods for the specified barcode symbology. \param[in] eBCType Type of barcode.
Return values:
e_CDMethod   * Array of check-digit method enumerators. The array is terminated with -1 (maximum array size is 5). ----------------------------------------------------------------------------.


LPCSTR BCGetNameFromEnumA (e_CDMethod eCDMethod)
 Returns name of check-digit method. Returns string description of the check-digit method specified. \param[in] eCDMethod Check-digit method.
Return values:
LPCSTR   String describing the check-digit method specified. ----------------------------------------------------------------------------.


LPCWSTR BCGetNameFromEnumW (e_CDMethod eCDMethod)
 Returns name of check-digit method. Returns string description of the check-digit method specified. \param[in] eCDMethod Check-digit method.
Return values:
LPCSTR   String describing the check-digit method specified. ----------------------------------------------------------------------------.


LPCSTR* BCGetCDListA ()
 Returns the implemented check-digit methods. Returns array of implemented check-digit methods. Use this function in connection with BCGetCDCount().
See also:
BCGetCDCount()
Return values:
LPCSTR   * String-array of implemented check-digit methods. ----------------------------------------------------------------------------.


LPCWSTR* BCGetCDListW ()
 Returns the implemented check-digit methods. Returns array of implemented check-digit methods. Use this function in connection with BCGetCDCount().
See also:
BCGetCDCount()
Return values:
LPCSTR   * String-array of implemented check-digit methods. ----------------------------------------------------------------------------.


LONG BCGetCDCount ()
 Returns number of implemented check-digit methods. Returns the number of implemented check-digit methods. Use this function in connection with BCGetCDList().
See also:
BCGetCDList()
Return values:
LONG   Number of supported check-digit methods ----------------------------------------------------------------------------.



Function Documentation

ERRCODE 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() \param[in] pBarCode Pointer to barcode structure.
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.

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() \param[in] pBarCode Pointer to barcode structure. \param[in] lpszData Pointer to zero-terminated data string. No data check is performed (e.g. if a check sum method allows only digits). \param[in] eCDMethod Check Digit method \param[in, out] lpszChecksum Check-digit text buffer. If NULL, nChecksum returns the number of check-digits. \param[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. ----------------------------------------------------------------------------.

ERRCODE BCCalcCDExtW ( t_BarCode * pBarCode,
LPCWSTR lpszData,
e_CDMethod eCDMethod,
LPWSTR 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() \param[in] pBarCode Pointer to barcode structure. \param[in] lpszData Pointer to zero-terminated data string. No data check is performed (e.g. if a check sum method allows only digits). \param[in] eCDMethod Check Digit method \param[in, out] lpszChecksum Check-digit text buffer. If NULL, nChecksum returns the number of check-digits. \param[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. ----------------------------------------------------------------------------.

LONG BCGetCDCount ( )

Returns number of implemented check-digit methods. Returns the number of implemented check-digit methods. Use this function in connection with BCGetCDList().

See also:
BCGetCDList()
Return values:
LONG   Number of supported check-digit methods ----------------------------------------------------------------------------.

LPCSTR * BCGetCDListA ( )

Returns the implemented check-digit methods. Returns array of implemented check-digit methods. Use this function in connection with BCGetCDCount().

See also:
BCGetCDCount()
Return values:
LPCSTR   * String-array of implemented check-digit methods. ----------------------------------------------------------------------------.

e_CDMethod * BCGetCDListByType ( e_BarCType eBCType )

Returns the implemented check-digit methods for a barcode symbology. Returns an array of implemented check-digit methods for the specified barcode symbology. \param[in] eBCType Type of barcode.

Return values:
e_CDMethod   * Array of check-digit method enumerators. The array is terminated with -1 (maximum array size is 5). ----------------------------------------------------------------------------.

LPCWSTR * BCGetCDListW ( )

Returns the implemented check-digit methods. Returns array of implemented check-digit methods. Use this function in connection with BCGetCDCount().

See also:
BCGetCDCount()
Return values:
LPCSTR   * String-array of implemented check-digit methods. ----------------------------------------------------------------------------.

e_CDMethod BCGetCDMethod ( t_BarCode * pBarCode )

Gets the check-digit method currently in use. Returns currently adjusted value.

See also:
BCSetCDMethod() \param[in] pBarCode Pointer to barcode structure.
Return values:
eCDStandard   No value set. This is the default. TBarCode computes the standard check-digit of the symbology.
e_CDMethod   Otherwise ----------------------------------------------------------------------------.

LONG BCGetCheckDigitsA ( t_BarCode * pBarCode,
LPSTR lpszCDText,
LONG nSize )

Returns all computed check-digits for the current barcode. Returns a string that contains all computed check-digits - in most cases 1 or 2 character(s). The string may contain unprintable characters (e.g. ASCII 0). Please note that symbology internal check sums (e.g. Mod-103 with Code-128) are not returned here. Call this function after BCCalcCD() or after BCCreate()

See also:
BCCalcCD(), BCCreate() \param[in] pBarCode Pointer to barcode structure. \param[in, out] lpszCDText Check-digit text buffer. If NULL this function returns only the number of check-digits. \param[in] nSize Buffer size of lpszCDText.
Return values:
LONG   Number of check-digits
-1   In case of error (buffer size to small) ----------------------------------------------------------------------------.

LONG BCGetCheckDigitsW ( t_BarCode * pBarCode,
LPWSTR lpszCDText,
LONG nSize )

Returns all computed check-digits for the current barcode. Returns a string that contains all computed check-digits - in most cases 1 or 2 character(s). The string may contain unprintable characters (e.g. ASCII 0). Please note that symbology internal check sums (e.g. Mod-103 with Code-128) are not returned here. Call this function after BCCalcCD() or after BCCreate()

See also:
BCCalcCD(), BCCreate() \param[in] pBarCode Pointer to barcode structure. \param[in, out] lpszCDText Check-digit text buffer. If NULL this function returns only the number of check-digits. \param[in] nSize Buffer size of lpszCDText.
Return values:
LONG   Number of check-digits
-1   In case of error (buffer size to small) ----------------------------------------------------------------------------.

LPCSTR BCGetNameFromEnumA ( e_CDMethod eCDMethod )

Returns name of check-digit method. Returns string description of the check-digit method specified. \param[in] eCDMethod Check-digit method.

Return values:
LPCSTR   String describing the check-digit method specified. ----------------------------------------------------------------------------.

LPCWSTR BCGetNameFromEnumW ( e_CDMethod eCDMethod )

Returns name of check-digit method. Returns string description of the check-digit method specified. \param[in] eCDMethod Check-digit method.

Return values:
LPCSTR   String describing the check-digit method specified. ----------------------------------------------------------------------------.

ERRCODE BCSetCDMethod ( t_BarCode * pBarCode,
e_CDMethod eMethod )

Chooses check-digit method to be used. Specifies the calculation method for the check-digit. Possible values are listed in the Barcode Reference.
The method for the check-digit calculation used by TBarCode depends on the adjusted barcode type. In order to make the product as user-friendly as possible, a standard (default) method for each barcode type is supplied. Please note that for some bar codes there is no default check digit, but using a specific method is recommended in their specification. Some symbologies have an internal check sum (e.g. Modulo-103 used with Code-128). This check sum is always part of the generated bar code - regardless what the user specifies here.

Attention:
Adjust only check-digit methods, which are allowed or recommended for a specific symbology. E.g. if a check-digit is generated, which cannot be encoded (e.g. due to limited character set of the barcode) you will get an error. Also consider that it can be necessary that the scanner configuration is adapted to the check digit.
See also:
BCGetCDMethod(), BCCalcCD() \param[in] pBarCode Pointer to barcode structure. \param[in] eMethod Check-digit method.
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.


© 2019 All rights reserved by TEC-IT Datenverarbeitung GmbH
Generated on Sat Jul 13 03:16:06 2019 for TBarCode Library 11 with doxygen 1.1.5