The dBarcode DLL uses a single data structure for transferring data into the library routines, BARCODE, which is defined in DLSBARUN.H along with a long pointer to the structure LPBAR. (This structure in new with version 6.1 of the DLSBARUN.DLL)
typedef struct tagBARCODE{
int code;
char name[16];
int orientation;
int error;
char string[84];
int parity;
int textgap;
char string2[84];
int bearerthick;
} BARCODE;
typedef BARCODE far *LPBAR;
A BARCODE structure must exist before any barcode-creating library routines are called, so your program requires a declaration such as
BARCODE bc;
to appear in the program before any calls are made to the library routines.
Some members of the Barcode 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.
Visual Basic callers use a slightly different structure definition, in which either strings of byte arrays may be defined. When byte arrays are used the length allowed for data is reduced by 4 bytes to allow for the array header, ie.
Private Type BARCODE
code As Long
name1(12) As Byte
show_text As Long
auto_parity As Long
orient As Long
show_checkdigit As Long
nominal_size As Long
line_reduction As Long
border_thickness As Long
fore_color As Long
back_color As Long
ierror As Long
string1(80) As Byte
req_number As Long
parity As Long
alphabetic As Long
length As Long
Height As Long
subscript As Long
flags As Long
textgap As Long
string2(80) As Byte
bearer_size As Long
spare As Long
xunit As Long
bxx As Long
margin_size As Long
barratio As Long
charspacing As Long
justification As Long
End Type
More: