int CIA_CALC ( LPSTR in, LPSTR out, LPSTR truetype, LPSTR symbology, LPINT outLen, LPINT truetypeLen )


in - String of data (ASCII characters usually) to put in the bar code. Example: "357394857".

out - Returned human-readable string form of the bar code. If you have specified H in symbology string. The returned out string is only useful if you want a check character added; otherwise out will be the same as in. If out is NULL, nothing is returned, but outLen is still returned.

truetype - Returned bar code string. Print this using TrueType font to produce the actual bar code symbol.

symbology - CIA_CALC can return any bar code type you require, by using symbology to define the bar code type you require. For example, the string "ITF-0.BA" is used to return an ITF (Interleaved 2 of 5) bar code with added check character.

Specifying a bar code type to discover other strings you can use to return different bar codes.

Printing check characters to discover how check character options can be specified.

Printing human-readable characters to discover how to create human-readable text.

Bar code options / formats to discover how you can select special features of each bar code type.

outLen - Returned length of out. If out is NULL, outLen is the length out would be. If outLen is NULL, nothing is returned.

truetypeLen - Returned length of truetype. If truetype is NULL, truetypeLen is the length truetype would be. If truetypeLen is NULL, nothing is returned.

Return value

A returned value of 0 indicates success. Any other value is an error code. Use CIA_ERR to retrieve the error message for the error code.


char in[512];
char out[512];
char truetype[512];
int errCode;

	strcpy ( in, "123456" );

	err = CIA_CALC ( in, out, truetype, "ITF-0.BHA", NULL, NULL );

Now truetype contains the bar code and out contains the human-readable text.

Variable Printed results Font used to print result
truetype CIA ITF Medium, 14 point.
out 01234565 Arial Bold, 10 point.




Copyright 2000 CIA (BAR CODES) UK. All rights reserved. Reproduction prohibited.