Parameters

dBarFont has four parameters, two of which may be obtained automatically by calling the dBFAsk() function.:

icode - type Long (or int)

This specifies the type of barcode to be created. The dFont DLL supports 16 different barcode types (24 if supplementaries are included). The type and the corresponding values of icode are shown in the Barcode type table at the end of this manual.

Xin - type String (or LPSTR)

This parameter is a pointer to the text (a null terminated string) which will be turned into characters which will make the barcode when displayed or printed in the appropriate font. While the string actually allows 100 characters to be present, the chances of scanning a normal barcode with so many characters is rather slim.

Xout - type String (or LPSTR)

This parameter is a pointer to the text variable (a null terminated string) which will receive the characters which will make the barcode when displayed or printed in the appropriate font. This variable must have been created and initialised BEFORE the call, with enough character positions to receive the output. A safe rule of thumb is to allow 8 characters more than that provided as Xin.

In C/C++ the Xout parameter can be the name of a char array. In Visual Basic a String variable which has been initialsed with say Xout$=“    “ will suffice.

Flags - type Long (or int)

 The flags parameter combines three flags which allow various features of the barcode to be specified, and may be calculated using the formula:

flags = icheckdigit + 2 * iextra1 + 4 * iextra2

The three flags, icheckdigit, iextra1 and iextra2 may only have values of 0 or 1. Any other value may generate unexpected results.

The icheckdigit flag enables the user to specify whether a check digit is to be calculated automatically by the DLL (and included in the output string).

If the icheckdigit flag is 1 then the DLL will calculate the check digit. If icheckdigit is 0 it will not.

The two flags iextra1 and iextra2 may normally be set to 0. However, their functions differ for different barcode types and the effects of setting values to 1 will be mentioned under the specific code type.

The Code type parameter values are shown in the Barcode types table at the end of this manual.

More:

Calling dBarFont()