Using the DLL

Probably the most import matter to resolve before using the DLL is what form you wish to create the barcode in.

We always recommend that barcode images are created as metafile images or enhanced metafile images. Using the calls Bar2Dm or Bar2Dmx will allow handles to these metafile images to be obtained directly.

Some developers may prefer (or be forced) to obtain the images from the clipboard (using Bar2Dc) or from a disk file (Bar2Df). Others may be unable to use metafile images and be forced to use either monochrome bitmaps or device independent bitmaps, either enlarged (to force a reasonable resolution) using calls to Bar2Db or Bar2Dd respectively, or at a specified target resolution in dpi using Bar2Db3 or Bar2Dd3 respectively.

The DLL can also draw the barcode image directly into a device context using Bar2Dh.

Group 1 calls to the DLL require a Barcode2D structure to be filled prior to the call. Visual Basic programmers should note that some of the elements of the structure are character arrays, and that when these are defined in VB as BYTE arrays, four characters are lost through the VB array header. (See the example VB programs included with the developer’s kit).

Group 2 calls do not require the Barcode structure (unless a structure is being retrieved from the properties dialog box), but do require a dialog box to be used to set barcode properties at least once.

It is also possible to create font-based barcodes for Aztec, Datamatrix, PDF417 and QR Code symbols and the linear variants of Databar barcodes. It is not possible to create font based barcodes for Code 16k, Code 49, Codablock, Maxicode or the stacked Databar types – because of the different heights of different parts of the symbols.

Finally it must be emphasised that barcodes created with the kit should be tested before being used. The thickness of lines is an essential element in the readability of barcode images, and while the DLL attempts to produce the correct line thickness, what actually appears on paper is also significantly influenced by the printer being used.

 

More:

Data structure