Data structure

The dBarcode-2D DLL uses a single data structure for transferring data into the library routines, BARCODE2D, which is defined in DLS2Dxx.H along with a long pointer to the structure (LPBAR2D).

 

typedef struct tagBARCODE2D
          {
          int                code;
          char             name[12];
          int                xunit;
          int                 yunit;
          int                start_mode;
          int                security_level;
          float             aspect_ratio;
          int                orientation;
          int                columns;
          int                line_reduction;
          int                border_thickness;
          COLORREF     fore_color;
          COLORREF     back_color;
          int                error;

          char                       string
[4096];
          int                c_number;
          int                parity;
          int                length;
          int                height;
          int                flags;
          int                spare;
          } BARCODE2D;

typedef BARCODE2D* LPBAR2D;

 

A BARCODE2D structure must exist before any library routines are called, so your program requires a declaration such as

BARCODE2D bc;

to appear in the program before any calls are made to the library routines.

Some members of the Barcode2D structure must be filled before any calls are made to the library routines. Other members of the structure are used for returning information to the calling application and so do not require filling prior to library calls.

More:

Library calls