- returns the name of a barcode type
Declared for C as
int WINAPI BarCdi(LPSTR szIn,LPINT ni, LPINT code,LPINT flags,LPSTR name)
where szIn is a pointer to a string containing the text
which is to be converted into the barcode – may be NULL for this function;
n
is the number of characters in the string (or 0 – in which case the string may
not contain NULL characters),
code specifies the barcode type whose name is
required
flags =0
name is a pointer to a string which receives the name of
the barcode type specified by the code parameter. Is NULL is code value not
valid.
Returns the value of code, or –1 if fails.
Basic declaration
Private Declare Function BarCdi Lib "dlunif" (ByVal szIn As String, ByRef n As Long, ByRef cd As Long, ByRef fl As Long, ByVal szname As String) As Long
This function may be used to fill a listbox with the available barcode type names; e.g.
sz$ = "test"
x$ = String(24, vbNullChar)
tt = 0
fg = 0
For i = 0 To 40
cd = i
n = BarCdi(ByVal sz$, tt, cd, fg, ByVal x$)
If (n >= 0) Then
Combo1.AddItem (x$)
End If
Next i
More: