dataapi.cpp File Reference


Functions

LONG BCGetMaxLenOfData (e_BarCType eType)
 Returns the number of characters for a specified barcode. Returns the exact number of characters that can be encoded with the specified barcode symbology. Returns zero if there is no specified length or an unknown barcode type was passed. \param[in] eType Barcode type.
Return values:
>0   The number of expected input characters.
0   Number of input characters is unknown for this barcode. ----------------------------------------------------------------------------.


ERRCODE BCSetTextEBCDIC (INT nCodepage, t_BarCode* pBarCode, LPCSTR szText, LONG nLen)
 Sets barcode text (EBCDIC version). This function works the same like BCSetTextA() except that the text is specified in EBCDIC encoding and internally converted to ASCII.
Note:
Please make sure to set up all barcode parameters (like barcode type, translation of escape sequences, etc.) before assigning the barcode data. Otherwise the input data will not be converted to the target character set correctly. \param[in] nCodepage The code page number. \param[in] pBarCode Pointer to barcode structure. \param[in] szText Bar-code text (EBCDIC encoded). \param[in] nLen Length of input string. - >0: Length of string is specified in nLen - 0: TBarCode expects a 0-terminated string
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.
More...


ERRCODE BCCheck (t_BarCode* pBarCode)
 Checks barcode input data for validity. The bar code data is validated to be encoded with the selected symbology. Adjust all bar code parameters before you call this function. If the input data is invalid (a non-zero error code was returned), you can correct the bar code data and try again. If the check was successful, do not change barcode parameters or input data anymore (before you create a bar code).
Note:
This function call is optional - if used it must be called before BCCreate().
Escape sequences in the bar code data (if enabled) are NOT translated during this check.
See also:
BCSetTextA(), BCGetInvalidDataPos(), BCSetTranslateEsc() \param[in] pBarCode Pointer to barcode structure.
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.


BOOL BCGetTranslateEsc (t_BarCode* pBarCode)
 Gets current state information regarding escape-sequence translation. Returns currently adjusted value.
See also:
BCSetTranslateEsc() \param[in] pBarCode Pointer to barcode structure.
Return values:
true   Escape sequences are translated
false   Escape sequences are not translated. This is the default ----------------------------------------------------------------------------.


ERRCODE BCSetTranslateEsc (t_BarCode* pBarCode, BOOL bTranslate)
 Activates/deactivates the translation of escape-sequences. Defines if escape-sequences in the input data (e.g. "
" in "123\n456") shall be translated before encoding takes place. If the translation of escape-sequences is switched off, all characters are encoded "as-is". If it is activated, escape-sequences are translated into their corresponding characters. See Barcode Reference for more information.
Note:
In order to encode barcode specific control characters (like subset selection in Code128 or FNC1) escape sequences are required.
Escape sequences cannot be used if data compression is activated (BCSetCompression()). If data compression is activated, Escape sequences are not translated. In addition, Escape sequences are not supported with target code page UTF-16 (will raise an error).
See also:
BCGetTranslateEsc(), BCSetTextA(), BCSetTextW() \param[in] pBarCode Pointer to barcode structure. \param[in] bTranslate Translate escape sequences. - true: Escape sequences (like "
") are translated - false: Escape sequences are not translated (the default)
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.


e_Compression BCGetCompression (t_BarCode* pBarCode)
 Returns mode of data compression for barcode content. \param[in] pBarCode Pointer to barcode structure.
Return values:
Compression   mode. ----------------------------------------------------------------------.


ERRCODE BCSetCompression (t_BarCode* pBarCode, e_Compression eCompression)
 Sets compression mode for barcode content \param[in,out] pBarCode Pointer to barcode structure. \param[in] eCompression Compression mode.
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------.


LPCSTR BCGetFormatA (t_BarCode* pBarCode)
 Gets current format string. Returns currently adjusted value.
See also:
BCSetFormat() \param[in] pBarCode Pointer to barcode structure.
Return values:
LPCSTR   Current format string. Default is NULL ----------------------------------------------------------------------------.


LPCWSTR BCGetFormatW (t_BarCode* pBarCode)
 Gets current format string. Returns currently adjusted value.
See also:
BCSetFormat() \param[in] pBarCode Pointer to barcode structure.
Return values:
LPCSTR   Current format string. Default is NULL ----------------------------------------------------------------------------.


ERRCODE BCSetFormatA (t_BarCode* pBarCode, LPCSTR szFormat)
 Sets format string applied to barcode data prior encoding. The format string is applied to the barcode data before it is encoded. Using the format string you can perform special operations (like including special control characters, subset switching, start/stop character control) easily.
Please refer to the Barcode Reference for more information.
See also:
BCSetTextA(), BCSetTextW(), BCGetFormat() \param[in] pBarCode Pointer to barcode structure. \param[in] szFormat The format string.
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred ----------------------------------------------------------------------------.


ERRCODE BCSetFormatW (t_BarCode* pBarCode, LPCWSTR szFormat)
 Sets format string applied to barcode data prior encoding. The format string is applied to the barcode data before it is encoded. Using the format string you can perform special operations (like including special control characters, subset switching, start/stop character control) easily.
Please refer to the Barcode Reference for more information.
See also:
BCSetTextA(), BCSetTextW(), BCGetFormat() \param[in] pBarCode Pointer to barcode structure. \param[in] szFormat The format string.
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred ----------------------------------------------------------------------------.


ERRCODE BCSetTextA (t_BarCode* pBarCode, LPCSTR szText, LONG nLen)
 Sets the barcode data (ASCII version). This function applies the input data to the barcode. The input data is also often called "utilisable data". The set of allowed characters depends on the selected barcode type. Some barcode types support alphanumeric or even binary characters, others only numeric. Some types require a specific data length, others do not. If the input data is invalid for the currently selected barcode type, an error code <> 0 is returned.
Please examine the Barcode Reference (https://www.tec-it.com/documentation) to be informed about the data format of the bar codes supported by TEC-IT.
Note:
Please make sure that you set up all barcode parameters (like barcode type, translation of escape sequences, etc.) before assigning the barcode data. Otherwise the input data will not be converted to the target character set correctly.
Encoding (ANSI / UNICODE): The user can either pass ANSI encoded data by calling <b>BCSetTextA</b> or UNICODE encoded data via <b>BCSetTextW</b>.\n The ANSI-encoded data consists of single byte characters and must correspond to Windows or IBM <i>CodePage 1252</i>, which is a special variety of <i>Latin-1</i>.\n /par On Windows systems UNICODE data is UTF-16 encoded, on AIX the encoding is UCS-2. Both are 2-byte encodings. On other Linux and UNIX system UCS-4, a 4-byte encoding, is used instead. \see BCGetText(), BCSetTextA(), BCSetTextW(), BCIsTextUnicode(), BCGetTextLen() \param[in] pBarCode Pointer to barcode structure. \param[in] szText Bar-code text. \param[in] nLen Length of input string. - >0: Length of string is specified in nLen - 0: TBarCode expects a 0-terminated string \retval #ERRCODE ErrOk (0) in case of success. Non-zero if error occurred.
----------------------------------------------------------------------------.
More...


ERRCODE BCSetTextW (t_BarCode* pBarCode, LPCWSTR szText, LONG nLen)
 Sets the barcode data (ASCII version). This function applies the input data to the barcode. The input data is also often called "utilisable data". The set of allowed characters depends on the selected barcode type. Some barcode types support alphanumeric or even binary characters, others only numeric. Some types require a specific data length, others do not. If the input data is invalid for the currently selected barcode type, an error code <> 0 is returned.
Please examine the Barcode Reference (https://www.tec-it.com/documentation) to be informed about the data format of the bar codes supported by TEC-IT.
Note:
Please make sure that you set up all barcode parameters (like barcode type, translation of escape sequences, etc.) before assigning the barcode data. Otherwise the input data will not be converted to the target character set correctly.
Encoding (ANSI / UNICODE): The user can either pass ANSI encoded data by calling <b>BCSetTextA</b> or UNICODE encoded data via <b>BCSetTextW</b>.\n The ANSI-encoded data consists of single byte characters and must correspond to Windows or IBM <i>CodePage 1252</i>, which is a special variety of <i>Latin-1</i>.\n /par On Windows systems UNICODE data is UTF-16 encoded, on AIX the encoding is UCS-2. Both are 2-byte encodings. On other Linux and UNIX system UCS-4, a 4-byte encoding, is used instead. \see BCGetText(), BCSetTextA(), BCSetTextW(), BCIsTextUnicode(), BCGetTextLen() \param[in] pBarCode Pointer to barcode structure. \param[in] szText Bar-code text. \param[in] nLen Length of input string. - >0: Length of string is specified in nLen - 0: TBarCode expects a 0-terminated string \retval #ERRCODE ErrOk (0) in case of success. Non-zero if error occurred.
----------------------------------------------------------------------------.
More...


LPCSTR BCGetTextA (t_BarCode* pBarCode)
 Gets barcode text. Returns the data to be encoded as barcode (also called utilizable data).
See also:
BCSetTextW() \param[in] pBarCode Pointer to barcode structure.
Return values:
LPCWSTR   Text to be encoded as barcode (UNICODE) ----------------------------------------------------------------------------.


LPCWSTR BCGetTextW (t_BarCode* pBarCode)
 Gets barcode text. Returns the data to be encoded as barcode (also called utilizable data).
See also:
BCSetTextW() \param[in] pBarCode Pointer to barcode structure.
Return values:
LPCWSTR   Text to be encoded as barcode (UNICODE) ----------------------------------------------------------------------------.


BOOL BCIsTextUnicode (t_BarCode* pBarCode)
 Returns type of current input data. Determines if barcode text was passed as UNICODE string or as ASCII string.
See also:
BCSetTextA(), BCSetTextW() \param[in] pBarCode Pointer to barcode structure.
Return values:
true   The barcode data was set with BCSetTextW().
false   The barcode data was set with BCSetTextA(). ----------------------------------------------------------------------------.


LONG BCGetTextLen (t_BarCode* pBarCode)
 Gets length of barcode input data. Gets the length of the data set by the user.
See also:
BCSetTextA(), BCSetTextW(), BCGetTextLenCompressed() \param[in] pBarCode Pointer to barcode structure.
Return values:
LONG   Number of characters ----------------------------------------------------------------------------.


LONG BCGetTextLenCompressed (t_BarCode* pBarCode)
 Gets length of barcode input data (after compression). Gets the length of the data to be encoded.
See also:
BCSetTextA(), BCSetTextW(), BCGetTextLen() \param[in] pBarCode Pointer to barcode structure.
Return values:
LONG   Number of characters ----------------------------------------------------------------------------.


e_EncodingMode BCGetEncodingMode (t_BarCode* pBarCode)
 Gets the data encoding mode. The data encoding mode specifies how TBarCode interprets the input data.
See also:
BCSetEncodingMode(), BCGetCodePage(), BCSetCodePage() \param[in] pBarCode Pointer to barcode structure.
Return values:
e_EncodingMode   The Encoding Mode. ----------------------------------------------------------------------------.


ERRCODE BCSetEncodingMode (t_BarCode* pBarCode, e_EncodingMode eMode)
 Sets the data encoding mode. The data encoding mode specifies how TBarCode interprets the input data. In dependence on whether the input data is UNICODE or single character encoded the mode has different effects. See e_EncodingMode and e_CodePage for a more detailed description.
See also:
BCGetEncodingMode(), BCGetCodePage(), BCSetCodePage(), e_EncodingMode, e_CodePage \param[in] pBarCode Pointer to barcode structure. \param[in] eMode The encoding mode.
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred ----------------------------------------------------------------------------.


e_CodePage BCGetCodePage (t_BarCode* pBarCode)
 Gets the input data encoding code page. If the data encoding mode is set to eEncMode_CodePage this function specifies in which code page the input data is encoded. Otherwise the code page is ignored. If the this function returns eCodePage_Custom use the function BCGetCodePageCustom to receive the code page.
See also:
BCSetEncodingMode(), BCGetEncodingMode(), BCSetCodePage(), BCSetCodePageCustom(), BCGetCodePageCustom() \param[in] pBarCode Pointer to barcode structure.
Return values:
e_CodePage   The Code Page Identifier. ----------------------------------------------------------------------------.


UINT BCGetCodePageCustom (t_BarCode* pBarCode)
 Gets the input data encoding code page. (custom value) If another than a predefined code page is used (BCGetCodePage returns eCodePage_Custom), this function returns the code page identifier.
See also:
BCSetEncodingMode(), BCGetEncodingMode(), BCGetCodePage(), BCSetCodePage(), BCSetCodePageCustom() \param[in] pBarCode Pointer to barcode structure.
Return values:
UINT   The Code Page Identifier. ----------------------------------------------------------------------------.


ERRCODE BCSetCodePage (t_BarCode* pBarCode, e_CodePage eCodePage)
 Sets the input data encoding code page. If the data encoding mode is set to eEncMode_CodePage this function specifies in which code page the input data is encoded. Otherwise the code page is ignored. See e_EncodingMode and e_CodePage for a more detailed description.
If the this function returns eCodePage_Custom use the function BCGetCodePageCustom to receive the code page as a code page identifier.
See also:
BCSetEncodingMode(), BCGetEncodingMode(), BCGetCodePage(), BCSetCodePageCustom(), e_EncodingMode, e_CodePage \param[in] pBarCode Pointer to barcode structure. \param[in] eCodePage The code page (as enumeration value).
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred ----------------------------------------------------------------------------.


ERRCODE BCSetCodePageCustom (t_BarCode* pBarCode, UINT nCodePage)
 Sets the input data encoding code page. If another than a predefined code page shall be used that means, if the code page is set to eCodePage_Custom, this function specifies in which code page the input data is encoded. Otherwise the value returned by BCGetCodePage is used.
See also:
BCSetEncodingMode(), BCGetEncodingMode(), BCGetCodePage(), e_EncodingMode, e_CodePage \param[in] pBarCode Pointer to barcode structure. \param[in] nCodePage The code page identifier (or CP number).
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred ----------------------------------------------------------------------------.


BOOL BCGetAutoCorrect (t_BarCode* pBarCode)
 Gets auto-correct option for Code 2 of 5 interleaved. Returns currently adjusted value.
See also:
BCSetAutoCorrect() \param[in] pBarCode Pointer to barcode structure.
Return values:
true   Enable auto-correct. This is the default
false   Disable auto-correct ----------------------------------------------------------------------------.


ERRCODE BCSetAutoCorrect (t_BarCode* pBarCode, BOOL bAutoCorrect)
 Sets auto-correct option for input data. If set to true TBarCode performs the following operations on the input data (before creating the bar code): - Code 39: Trim leading/trailing '*' characters (start/stop characters are added by the encoder) - ISBN-13/ISSN/ISMN: Remove '-' characters (not encoded into the bar code) - Code 2of5 Interleaved: Insert a leading zero if the number of data digits is odd (2/5 IL supports only even number of digits) - Code-128: Remove multiple occurences of leading FNC1 and all occurences of trailing FNC1 characters. - GS1-128: Remove all leading and trailing FNC1 characters (the FNC1 at first position is added by the encoder).
Note:
Should always be true. If this option is set to false BCCheck() or BCCreate() may return with an error. \param[in] pBarCode Pointer to barcode structure. \param[in] bAutoCorrect Auto correct flag. - true ... Enable auto-correct - false ... Disable auto-correct
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred.
See also:
BCGetAutoCorrect() ----------------------------------------------------------------------------.


LPCSTR BCGetDefaultDataByTypeA (e_BarCType eBCType)
 Returns the default data according to given bar code type. Returns the default data as string for the specified barcode symbology. \param[in] eBCType Type of barcode.
Return values:
LPCSTR   The default data for given bar code type. ----------------------------------------------------------------------------.


LPCWSTR BCGetDefaultDataByTypeW (e_BarCType eBCType)
 Returns the default data according to given bar code type. Returns the default data as string for the specified barcode symbology. \param[in] eBCType Type of barcode.
Return values:
LPCSTR   The default data for given bar code type. ----------------------------------------------------------------------------.



Function Documentation

ERRCODE BCCheck ( t_BarCode * pBarCode )

Checks barcode input data for validity. The bar code data is validated to be encoded with the selected symbology. Adjust all bar code parameters before you call this function. If the input data is invalid (a non-zero error code was returned), you can correct the bar code data and try again. If the check was successful, do not change barcode parameters or input data anymore (before you create a bar code).

Note:
This function call is optional - if used it must be called before BCCreate().
Escape sequences in the bar code data (if enabled) are NOT translated during this check.
See also:
BCSetTextA(), BCGetInvalidDataPos(), BCSetTranslateEsc() \param[in] pBarCode Pointer to barcode structure.
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.

BOOL BCGetAutoCorrect ( t_BarCode * pBarCode )

Gets auto-correct option for Code 2 of 5 interleaved. Returns currently adjusted value.

See also:
BCSetAutoCorrect() \param[in] pBarCode Pointer to barcode structure.
Return values:
true   Enable auto-correct. This is the default
false   Disable auto-correct ----------------------------------------------------------------------------.

e_CodePage BCGetCodePage ( t_BarCode * pBarCode )

Gets the input data encoding code page. If the data encoding mode is set to eEncMode_CodePage this function specifies in which code page the input data is encoded. Otherwise the code page is ignored. If the this function returns eCodePage_Custom use the function BCGetCodePageCustom to receive the code page.

See also:
BCSetEncodingMode(), BCGetEncodingMode(), BCSetCodePage(), BCSetCodePageCustom(), BCGetCodePageCustom() \param[in] pBarCode Pointer to barcode structure.
Return values:
e_CodePage   The Code Page Identifier. ----------------------------------------------------------------------------.

UINT BCGetCodePageCustom ( t_BarCode * pBarCode )

Gets the input data encoding code page. (custom value) If another than a predefined code page is used (BCGetCodePage returns eCodePage_Custom), this function returns the code page identifier.

See also:
BCSetEncodingMode(), BCGetEncodingMode(), BCGetCodePage(), BCSetCodePage(), BCSetCodePageCustom() \param[in] pBarCode Pointer to barcode structure.
Return values:
UINT   The Code Page Identifier. ----------------------------------------------------------------------------.

e_Compression BCGetCompression ( t_BarCode * pBarCode )

Returns mode of data compression for barcode content. \param[in] pBarCode Pointer to barcode structure.

Return values:
Compression   mode. ----------------------------------------------------------------------.

LPCSTR BCGetDefaultDataByTypeA ( e_BarCType eBCType )

Returns the default data according to given bar code type. Returns the default data as string for the specified barcode symbology. \param[in] eBCType Type of barcode.

Return values:
LPCSTR   The default data for given bar code type. ----------------------------------------------------------------------------.

LPCWSTR BCGetDefaultDataByTypeW ( e_BarCType eBCType )

Returns the default data according to given bar code type. Returns the default data as string for the specified barcode symbology. \param[in] eBCType Type of barcode.

Return values:
LPCSTR   The default data for given bar code type. ----------------------------------------------------------------------------.

e_EncodingMode BCGetEncodingMode ( t_BarCode * pBarCode )

Gets the data encoding mode. The data encoding mode specifies how TBarCode interprets the input data.

See also:
BCSetEncodingMode(), BCGetCodePage(), BCSetCodePage() \param[in] pBarCode Pointer to barcode structure.
Return values:
e_EncodingMode   The Encoding Mode. ----------------------------------------------------------------------------.

LPCSTR BCGetFormatA ( t_BarCode * pBarCode )

Gets current format string. Returns currently adjusted value.

See also:
BCSetFormat() \param[in] pBarCode Pointer to barcode structure.
Return values:
LPCSTR   Current format string. Default is NULL ----------------------------------------------------------------------------.

LPCWSTR BCGetFormatW ( t_BarCode * pBarCode )

Gets current format string. Returns currently adjusted value.

See also:
BCSetFormat() \param[in] pBarCode Pointer to barcode structure.
Return values:
LPCSTR   Current format string. Default is NULL ----------------------------------------------------------------------------.

LONG BCGetMaxLenOfData ( e_BarCType eType )

Returns the number of characters for a specified barcode. Returns the exact number of characters that can be encoded with the specified barcode symbology. Returns zero if there is no specified length or an unknown barcode type was passed. \param[in] eType Barcode type.

Return values:
>0   The number of expected input characters.
0   Number of input characters is unknown for this barcode. ----------------------------------------------------------------------------.

LPCSTR BCGetTextA ( t_BarCode * pBarCode )

Gets barcode text. Returns the data to be encoded as barcode (also called utilizable data).

See also:
BCSetTextW() \param[in] pBarCode Pointer to barcode structure.
Return values:
LPCWSTR   Text to be encoded as barcode (UNICODE) ----------------------------------------------------------------------------.

LONG BCGetTextLen ( t_BarCode * pBarCode )

Gets length of barcode input data. Gets the length of the data set by the user.

See also:
BCSetTextA(), BCSetTextW(), BCGetTextLenCompressed() \param[in] pBarCode Pointer to barcode structure.
Return values:
LONG   Number of characters ----------------------------------------------------------------------------.

LONG BCGetTextLenCompressed ( t_BarCode * pBarCode )

Gets length of barcode input data (after compression). Gets the length of the data to be encoded.

See also:
BCSetTextA(), BCSetTextW(), BCGetTextLen() \param[in] pBarCode Pointer to barcode structure.
Return values:
LONG   Number of characters ----------------------------------------------------------------------------.

LPCWSTR BCGetTextW ( t_BarCode * pBarCode )

Gets barcode text. Returns the data to be encoded as barcode (also called utilizable data).

See also:
BCSetTextW() \param[in] pBarCode Pointer to barcode structure.
Return values:
LPCWSTR   Text to be encoded as barcode (UNICODE) ----------------------------------------------------------------------------.

BOOL BCGetTranslateEsc ( t_BarCode * pBarCode )

Gets current state information regarding escape-sequence translation. Returns currently adjusted value.

See also:
BCSetTranslateEsc() \param[in] pBarCode Pointer to barcode structure.
Return values:
true   Escape sequences are translated
false   Escape sequences are not translated. This is the default ----------------------------------------------------------------------------.

BOOL BCIsTextUnicode ( t_BarCode * pBarCode )

Returns type of current input data. Determines if barcode text was passed as UNICODE string or as ASCII string.

See also:
BCSetTextA(), BCSetTextW() \param[in] pBarCode Pointer to barcode structure.
Return values:
true   The barcode data was set with BCSetTextW().
false   The barcode data was set with BCSetTextA(). ----------------------------------------------------------------------------.

ERRCODE BCSetAutoCorrect ( t_BarCode * pBarCode,
BOOL bAutoCorrect )

Sets auto-correct option for input data. If set to true TBarCode performs the following operations on the input data (before creating the bar code): - Code 39: Trim leading/trailing '*' characters (start/stop characters are added by the encoder) - ISBN-13/ISSN/ISMN: Remove '-' characters (not encoded into the bar code) - Code 2of5 Interleaved: Insert a leading zero if the number of data digits is odd (2/5 IL supports only even number of digits) - Code-128: Remove multiple occurences of leading FNC1 and all occurences of trailing FNC1 characters. - GS1-128: Remove all leading and trailing FNC1 characters (the FNC1 at first position is added by the encoder).

Note:
Should always be true. If this option is set to false BCCheck() or BCCreate() may return with an error. \param[in] pBarCode Pointer to barcode structure. \param[in] bAutoCorrect Auto correct flag. - true ... Enable auto-correct - false ... Disable auto-correct
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred.
See also:
BCGetAutoCorrect() ----------------------------------------------------------------------------.

ERRCODE BCSetCodePage ( t_BarCode * pBarCode,
e_CodePage eCodePage )

Sets the input data encoding code page. If the data encoding mode is set to eEncMode_CodePage this function specifies in which code page the input data is encoded. Otherwise the code page is ignored. See e_EncodingMode and e_CodePage for a more detailed description.
If the this function returns eCodePage_Custom use the function BCGetCodePageCustom to receive the code page as a code page identifier.

See also:
BCSetEncodingMode(), BCGetEncodingMode(), BCGetCodePage(), BCSetCodePageCustom(), e_EncodingMode, e_CodePage \param[in] pBarCode Pointer to barcode structure. \param[in] eCodePage The code page (as enumeration value).
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred ----------------------------------------------------------------------------.

ERRCODE BCSetCodePageCustom ( t_BarCode * pBarCode,
UINT nCodePage )

Sets the input data encoding code page. If another than a predefined code page shall be used that means, if the code page is set to eCodePage_Custom, this function specifies in which code page the input data is encoded. Otherwise the value returned by BCGetCodePage is used.

See also:
BCSetEncodingMode(), BCGetEncodingMode(), BCGetCodePage(), e_EncodingMode, e_CodePage \param[in] pBarCode Pointer to barcode structure. \param[in] nCodePage The code page identifier (or CP number).
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred ----------------------------------------------------------------------------.

ERRCODE BCSetCompression ( t_BarCode * pBarCode,
e_Compression eCompression )

Sets compression mode for barcode content \param[in,out] pBarCode Pointer to barcode structure. \param[in] eCompression Compression mode.

Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------.

ERRCODE BCSetEncodingMode ( t_BarCode * pBarCode,
e_EncodingMode eMode )

Sets the data encoding mode. The data encoding mode specifies how TBarCode interprets the input data. In dependence on whether the input data is UNICODE or single character encoded the mode has different effects. See e_EncodingMode and e_CodePage for a more detailed description.

See also:
BCGetEncodingMode(), BCGetCodePage(), BCSetCodePage(), e_EncodingMode, e_CodePage \param[in] pBarCode Pointer to barcode structure. \param[in] eMode The encoding mode.
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred ----------------------------------------------------------------------------.

ERRCODE BCSetFormatA ( t_BarCode * pBarCode,
LPCSTR szFormat )

Sets format string applied to barcode data prior encoding. The format string is applied to the barcode data before it is encoded. Using the format string you can perform special operations (like including special control characters, subset switching, start/stop character control) easily.
Please refer to the Barcode Reference for more information.

See also:
BCSetTextA(), BCSetTextW(), BCGetFormat() \param[in] pBarCode Pointer to barcode structure. \param[in] szFormat The format string.
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred ----------------------------------------------------------------------------.

ERRCODE BCSetFormatW ( t_BarCode * pBarCode,
LPCWSTR szFormat )

Sets format string applied to barcode data prior encoding. The format string is applied to the barcode data before it is encoded. Using the format string you can perform special operations (like including special control characters, subset switching, start/stop character control) easily.
Please refer to the Barcode Reference for more information.

See also:
BCSetTextA(), BCSetTextW(), BCGetFormat() \param[in] pBarCode Pointer to barcode structure. \param[in] szFormat The format string.
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred ----------------------------------------------------------------------------.

ERRCODE BCSetTextA ( t_BarCode * pBarCode,
LPCSTR szText,
LONG nLen )

Sets the barcode data (ASCII version). This function applies the input data to the barcode. The input data is also often called "utilisable data". The set of allowed characters depends on the selected barcode type. Some barcode types support alphanumeric or even binary characters, others only numeric. Some types require a specific data length, others do not. If the input data is invalid for the currently selected barcode type, an error code <> 0 is returned.
Please examine the Barcode Reference (https://www.tec-it.com/documentation) to be informed about the data format of the bar codes supported by TEC-IT.

Note:
Please make sure that you set up all barcode parameters (like barcode type, translation of escape sequences, etc.) before assigning the barcode data. Otherwise the input data will not be converted to the target character set correctly.
Encoding (ANSI / UNICODE): The user can either pass ANSI encoded data by calling <b>BCSetTextA</b> or UNICODE encoded data via <b>BCSetTextW</b>.\n The ANSI-encoded data consists of single byte characters and must correspond to Windows or IBM <i>CodePage 1252</i>, which is a special variety of <i>Latin-1</i>.\n /par On Windows systems UNICODE data is UTF-16 encoded, on AIX the encoding is UCS-2. Both are 2-byte encodings. On other Linux and UNIX system UCS-4, a 4-byte encoding, is used instead. \see BCGetText(), BCSetTextA(), BCSetTextW(), BCIsTextUnicode(), BCGetTextLen() \param[in] pBarCode Pointer to barcode structure. \param[in] szText Bar-code text. \param[in] nLen Length of input string. - >0: Length of string is specified in nLen - 0: TBarCode expects a 0-terminated string \retval #ERRCODE ErrOk (0) in case of success. Non-zero if error occurred.
----------------------------------------------------------------------------.

\

ERRCODE BCSetTextEBCDIC ( INT nCodepage,
t_BarCode * pBarCode,
LPCSTR szText,
LONG nLen )

Sets barcode text (EBCDIC version). This function works the same like BCSetTextA() except that the text is specified in EBCDIC encoding and internally converted to ASCII.

Note:
Please make sure to set up all barcode parameters (like barcode type, translation of escape sequences, etc.) before assigning the barcode data. Otherwise the input data will not be converted to the target character set correctly. \param[in] nCodepage The code page number. \param[in] pBarCode Pointer to barcode structure. \param[in] szText Bar-code text (EBCDIC encoded). \param[in] nLen Length of input string. - >0: Length of string is specified in nLen - 0: TBarCode expects a 0-terminated string
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.

\

ERRCODE BCSetTextW ( t_BarCode * pBarCode,
LPCWSTR szText,
LONG nLen )

Sets the barcode data (ASCII version). This function applies the input data to the barcode. The input data is also often called "utilisable data". The set of allowed characters depends on the selected barcode type. Some barcode types support alphanumeric or even binary characters, others only numeric. Some types require a specific data length, others do not. If the input data is invalid for the currently selected barcode type, an error code <> 0 is returned.
Please examine the Barcode Reference (https://www.tec-it.com/documentation) to be informed about the data format of the bar codes supported by TEC-IT.

Note:
Please make sure that you set up all barcode parameters (like barcode type, translation of escape sequences, etc.) before assigning the barcode data. Otherwise the input data will not be converted to the target character set correctly.
Encoding (ANSI / UNICODE): The user can either pass ANSI encoded data by calling <b>BCSetTextA</b> or UNICODE encoded data via <b>BCSetTextW</b>.\n The ANSI-encoded data consists of single byte characters and must correspond to Windows or IBM <i>CodePage 1252</i>, which is a special variety of <i>Latin-1</i>.\n /par On Windows systems UNICODE data is UTF-16 encoded, on AIX the encoding is UCS-2. Both are 2-byte encodings. On other Linux and UNIX system UCS-4, a 4-byte encoding, is used instead. \see BCGetText(), BCSetTextA(), BCSetTextW(), BCIsTextUnicode(), BCGetTextLen() \param[in] pBarCode Pointer to barcode structure. \param[in] szText Bar-code text. \param[in] nLen Length of input string. - >0: Length of string is specified in nLen - 0: TBarCode expects a 0-terminated string \retval #ERRCODE ErrOk (0) in case of success. Non-zero if error occurred.
----------------------------------------------------------------------------.

\

ERRCODE BCSetTranslateEsc ( t_BarCode * pBarCode,
BOOL bTranslate )

Activates/deactivates the translation of escape-sequences. Defines if escape-sequences in the input data (e.g. "
" in "123\n456") shall be translated before encoding takes place. If the translation of escape-sequences is switched off, all characters are encoded "as-is". If it is activated, escape-sequences are translated into their corresponding characters. See Barcode Reference for more information.

Note:
In order to encode barcode specific control characters (like subset selection in Code128 or FNC1) escape sequences are required.
Escape sequences cannot be used if data compression is activated (BCSetCompression()). If data compression is activated, Escape sequences are not translated. In addition, Escape sequences are not supported with target code page UTF-16 (will raise an error).
See also:
BCGetTranslateEsc(), BCSetTextA(), BCSetTextW() \param[in] pBarCode Pointer to barcode structure. \param[in] bTranslate Translate escape sequences. - true: Escape sequences (like "
") are translated - false: Escape sequences are not translated (the default)
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