The DLUNIF DLL

To convert a string of characters into the bars and spaces required for the barcode requires converting the character string into another string – made up of only the 0 – z  (ASCII 48 – 122) characters present in the Universal Barcode Font.

The DLUNIF.DLL will perform this conversion, and provides three function calls which can either return the required string, copy it to the clipboard, or save it to a named disk file.  These functions may be called from Visual Basic (including Visual Basic for Applications in Microsoft Office), Visual C++, Visual Foxpro, Delphi, C++ Builder, and in fact virtually every language that can make DLL calls.

The functions are called with parameters that specify the options available for the barcode:

szIn – is a pointer to a string containing the bytes used as data to create the barcode. While passed as a text string, the string can contain non-text bytes (including ASCII 0) provided that the length parameter (n) is used to specify the length of the data. If n is 0, then the string is assumed to be a null-terminated ASCII string.

n – a pointer to an integer which is either 0 or specified the length of the data in szIn.

Code – a pointer to an integer that specifies the type of barcode to be created.

The complete list of codes and the barcode types supported is shown above.

flags – a pointer to an integer that specifies additional characteristics of the barcode. The integer uses bit settings to enable specific properties.

The following flag bits are used in the current release:

 

Bit

Property

1

Automatic check digit

2

Wide bars = 3X units

4

Extra 1 setting

5

Extra 2 setting

 

Automatic Check Digit: When this flag is set calls to the DLL will automatically calculate optional check digits and include it/them in the barcode produced. When this flag is not set it is assumed that the user has supplied data including the check digit. Note that the flag is ignored for barcode types that have hidden check digits (Code 128 and EAN 128); for these code types the check digit is always calculated by the DLL.

Wide Bars: When this flag is set wide bars are produced at 3X units width. When the flag in not set wide bars are produced at 2X units width. Note that this flag is ignored for barcode types that do not allow a variable width ratio.

Extra 1 and Extra 2: These flags have an effect that is barcode type dependent; see the details under the barcode type discussed in the Barcodes HELP file supplied with this product.

 

More:

Function calls