Using the dBarcode DLL

Probably the most import matter to resolve before using the DLL is what type of image you wish to create.

We always recommend that barcode images are created as metafile images or enhanced metafile images. Using the call BarCodem (or BarCdm) and BarCodemx (or BarCdmx) 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 BarCodec or BarCdc) or from a disk file (BarCodef or BarCds). Others may be unable to use metafile images and be forced to use either monochrome bitmaps or device independent bitmaps, at the current default resolutions using calls to SetDpi, BarCodeb or BarCoded respectively, or at a specified target resolution in dpi using BarCodeb3 or BarCoded3 respectively.

The DLL can also draw the barcode image directly into a device context using BarCodeh or BarCodeh2 (or BarCdh2)

The Group 1 calls to the DLL require a Barcode structure to be filled prior to the call.

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

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, as shown in the VB declaration below.

Finally it must be emphasised that barcodes created with the kit should be tested before being used. The thickness of lines is an essentially 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