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 (http://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 BCSetTextA or UNICODE encoded data via BCSetTextW.
The ANSI-encoded data consists of single byte characters and must correspond to Windows or IBM CodePage 1252, which is a special variety of Latin-1.
/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 also:
BCGetText(), BCSetTextA(), BCSetTextW(), BCIsTextUnicode(), BCGetTextLen()
Parameters:
[in] pBarCode Pointer to barcode structure.
[in] szText Bar-code text.
[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.

© 2008 All rights reserved by TEC-IT Datenverarbeitung GmbH
Generated on Thu Jun 30 16:34:47 2011 for TEC-IT TBarCode Library 10 with doxygen 1.6.2