Native Windows Font Encoder DLL
IDAutomation's Native Windows Barcode DLL was written in C++, has
no COM or MFC dependencies and may be used in any application or development
environment that can call a method from a DLL. It contains methods for
Postnet, Planet, Code 3 of 9, Interleaved 2 of 5, Code 93, Code 128,
UPC-A, EAN-13, EAN-8, UCC-128, GS1-128, all GS1 DataBar variants including
Omni-directional, Stacked and Expanded Stacked, MSI, Plessey and USPS
Intelligent
Mail. This font encoder DLL also contains methods for the
GS1 DataBar Font
and the IDAutomation
Universal Barcode Font Advantage™. This product may be used royalty
free if a license to one of IDAutomation's barcode fonts has been purchased.
Additional barcode font tools:
Microsoft Office
Macros and VBA |
Crystal Reports
UFL |
Microsoft Reporting Services
The purpose of this DLL is to return a string formatted to one of
IDAutomation's barcode fonts. IDAutomation's DLL is free to use and
distribute with the application as long as it is being used with one
of IDAutomation's licensed barcode fonts. Redistribution of IDAutomation's
fonts and components requires a Developer License.
The API of the Native Windows Barcode
DLL
Advanced programmers with an understanding of how Windows DLLs work
should only use the API of the Native Windows Barcode DLL. For all other
purposes, IDAutomation suggests using other
Font Tools.
The Native Windows DLL cannot return a string value. This limitation
requires that the return value be passed as a variable to the method
by reference; that being said, there are a few differences between the
Native Windows Barcode DLL and the methods
listed. The differences are as follows:
- Return value - the methods return 0 for success or a
non-zero value if the method fails.
- Output - this string value (passed by reference) will
be populated by the DLL with the encoded data.
- Output size - this integer value is populated by the
DLL with the number of pertinent characters. It may be necessary
to use this with the VB Mid Function, for example: BarcodeString=
Mid(myOut, 1, iSize).
For example, in the General Declarations or in a separate module
of a VB application or Excel spreadsheet VBA editor, the method needs
to be defined:
Private Declare Function IDAutomation_Universal_C128
_
Lib "IDAutomationNativeFontEncoder.dll" _
(ByVal D2E As String, ByRef tilde As Long, _
ByVal out As String, _
ByRef iSize As Long) As Long
In a button click event, or any other procedure, the method can be
called. The DLL method needs an input parameter that can be filled by
the DLL with the formatted data. For example:
Public Function IDAutomation_Uni_C128(DataToEncode
As String, Optional applyTilde As Boolean = False) As String
Dim myOut As String 'Variable to be populated
by DLL method with formatted data
Dim iSize As Long 'The size of the formatted
data. Also, populated by the DLL
Dim lRetVal As Long 'Return value of the
method. Will be zero if successful
Dim long_AT As Long 'variable to be passed
to DLL determining if tilde processing should be done.
'Must be a long data type for DLL to accept
myOut = String(250, " ") 'The output variable
needs to be sized to hold the data. The DLL can not dynamically
size a variable
iSize = 0
If applyTilde = True Then
L_AT = True 'can be implicitly converted to a long
Else
L_AT = False
End If
'Call the method, passing in the data to
encode, a boolean deciding if tilde processing should be used,
'the output variable, and the variable that will be populated
with the size
lRetVal = IDAutomation_Universal_C128(DataToEncode, L_AT, myOut,
iSize)
'Write out the output string, taking only
the number of characters necessary from the defined string
IDAutomation_Uni_C128 = Mid(myOut, 1, iSize)
End Function
This DLL is supplied with an Excel example, which includes a
VBA module.
The VBA module
may
be exported and used in VB 6, Microsoft Office and other applications.
The Following Barcode Methods are
Available:
The methods listed below are available in IDAutomation's
DLL and are only valid when used with the font listed in the "font to
use" column. The RetrunVal and Size parameters found in
the methods below are passed by reference. The RetrunVal is the encoded
string to be used with the appropriate font; the Size variable is the
size of ReturnVal.
|
Font to use |
Notes |
| Methods in this section
are all preceded with IDAutomation_ |
| long
IDAutomation_Code128 (char *DataToEncode, long &ApplyTilde,
char *ReturnVal, long &Size) |
IDAutomationC128 |
This is a "Code 128 Auto" method
that will automatically encode any DataToEncode from ASCII 0
to ASCII 127. When ApplyTilde is equal to 1 or true, in Code
128 Auto, the format ~ddd may be used to specify the ASCII code
of the character to be encoded and
several other tilde options are enabled. |
| long IDAutomation_Code128HumanReadable
(char *DataToEncode, long &ApplyTilde, char *ReturnVal, long
&Size) |
Any Text Font |
If Code 128 barcodes are being
created which need the text formatted, this method may be used
according to IDAutomation's
Code128 Barcode FAQ. |
| long
IDAutomation_Code128a (char *DataToEncode, char *ReturnVal,
long &Size) |
IDAutomationC128 |
In this method, the
character values 64 through 95 from set A may be used to
create methods when scanned. Formats output to the
Code 128
barcode fonts. |
| long
IDAutomation_Code128b (char *DataToEncode, char *ReturnVal,
long &Size) |
IDAutomationC128 |
Returns a string formatted to
the Code 128 character set B. Formats output to the
Code 128
barcode fonts. |
| long
IDAutomation_Code128c (char *DataToEncode, char *ReturnVal,
long &Size) |
IDAutomationC128 |
This code128 method "interleaves"
numbers into pairs for high density. |
| long
IDAutomation_Interleaved2of5 (char *DataToEncode, char *ReturnVal,
long &Size) |
IDAutomationI25
or
IDAutomationHI25 |
This method "interleaves" numbers
into pairs for high density without check digits and formats
the return string to the
Interleaved 2 of 5 barcode fonts. |
| long
IDAutomation_Interleaved2of5Mod10 (char *DataToEncode, char
*ReturnVal, long &Size) |
IDAutomationI25
or
IDAutomationHI25 |
Performs the mod10 checksum calculation
for increased accuracy and formats the return string to the
Interleaved 2 of 5 barcode fonts.
USPS
requires MOD 10 checksums for special services
and for SSC-14 when using Interleaved 2 of 5 for that purpose. |
| long
IDAutomation_Code39
(char *DataToEncode, char *ReturnVal, long &Size) |
IDAutomationI25
or
IDAutomationHI25 |
Formats the output to print using
Code 3 of
9 barcode fonts. |
| long
IDAutomation_Code39Mod43 (char *DataToEncode, char *ReturnVal,
long &Size) |
IDAutomationI25
or
IDAutomationHI25 |
Performs the mod43 checksum calculation
for increased accuracy and then formats the output to print
using Code
39 barcode fonts. The mod43 checksum is usually required
for LOGMARS and HIBC applications. |
| long
IDAutomation_Code93
(char *DataToEncode, char *ReturnVal, long &Size) |
IDAutomationC93 |
Formats the output to print with
the 2 required check digits using
Code 93
barcode fonts. |
| long
IDAutomation_Codabar
(char *DataToEncode, char *ReturnVal, long &Size) |
IDAutomationCB |
Formats the output to print using
Codabar
barcode fonts. |
| long IDAutomation_UCC128 (char
*DataToEncode, char *ReturnVal, long &Size) |
IDAutomationC128 |
This symbology option encodes
an even number of number digits and includes the FNC1 character
in set C as required. Use
Code 128 Auto to encode additional FNC1 codes or data containing
text or odd numbers. Use the UCC128 method only for UCC-128
applications where the input data is an even number such as
in SSCC-18 and SCC-14 barcodes. |
| long
IDAutomation_Postnet (char *DataToEncode, char *szReturnVal,
long &Size) |
IDAutomationPOSTNET
or
IDAutomationPLANET |
Enter a single string of Zip,
Zip + 4 or Zip + 4 + Delivery Point. The DataToEncode must be
a number and can include dashes and spaces. |
| long
IDAutomation_MSI
(char *DataToEncode, char *ReturnVal, long &Size) |
IDAutomationMSI
or
IDAutomationHMSI |
Formats output to the
MSI Code barcode
fonts. |
| long
IDAutomation_UPCa
(char *DataToEncode, char *ReturnVal, long &Size) |
IDAutomationUPCEAN |
DataToEncode is a UPC-A number
string of 11, 12, 13, 14, 16 or 17 digits with or without a
check digit, add-ons are supported. Formats output to the
UPC/EAN
barcode font. Entering incorrect data will create a barcode
containing all zeros. |
| long
IDAutomation_UPCe
(char *DataToEncode, char *szReturnVal, long &iSize) |
IDAutomationUPCEAN |
DataToEncode is a UPC-A number
string of 11, 12, 13, 14, 16 or 17 digits with or without a
check digit, add-ons are supported. The purpose of this method
is to print the UPC-E barcode from a UPC-A barcode that can
be compressed. Formats output to the
UPC/EAN
barcode font. Entering incorrect data will create a barcode
containing "00005000000". |
| long
IDAutomation_EAN13
(char *DataToEncode, char *ReturnVal, long &Size) |
IDAutomationUPCEAN |
DataToEncode is a number string
of 12, 13, 14, 15, 17 or 18 digits with or without a check digit,
add-ons are supported. Formats output to the
UPC/EAN
barcode font. Entering incorrect data will create a barcode
containing all zeros. |
| long
IDAutomation_EAN8
(char *DataToEncode, char *ReturnVal, long &Size) |
IDAutomationUPCEAN |
DataToEncode is a number string
of 7 or 8 characters (EAN-8 without the check digit). Formats
output to the
UPC/EAN
barcode font. Entering incorrect data will create a barcode
containing all zeros. |
All
methods listed below are preceded with IDAutomation_Universal_
and are only to be used with the
IDAutomation
Universal Barcode Font Advantage™ |
| Methods in this section
are all preceded with IDAutomation_Uni_ |
|
Font to use |
Notes |
| long IDAutomation_Universal_C128
(char *DataToEncode, long &ApplyTilde, char *ReturnVal, long
&Size) |
IDAutomation Uni |
This is a "Code
128 Auto" method that will automatically encode any data
from ASCII 1 to ASCII 127. It will automatically switch to character
set C to encode numbers as necessary. To encode alpha-numeric
UCC/EAN-128, ASCII 202 or character Ê is entered
as the FNC1 before each AI. When any barcode begins with the
FNC1, it automatically starts in Set C as required.
For example, the UCC number of (8100)712345(21)12WH5678 should
be entered as a formula of:
IDAutomation_Uni_C128 ("Ê8100712345Ê2112WH5678",
TRUE)
or
IDAutomation_Uni_C128 ("Ê" & {Table1.DataField1}
& "Ê" & {Table1.DataField2}, TRUE)
More information about
AIs and UCC/EAN-128 is located here.
If ApplyTilde is set to True,
the tilde will be processed. ApplyTilde
is False by default in this method.
|
| long IDAutomation_Universal_C128HR
(char *DataToEncode, long &ApplyTilde, char *ReturnVal, long
&Size) |
Text Font |
If Code 128
barcodes are created which need the text formatted, this method
may be used. It is generally only used to format the text for
UCC/EAN barcodes according to IDAutomation's
Code128 Barcode FAQ. For example:
IDAutomation_C128HR ("Ê" & "8100712345"
& "Ê" & "2112345678", TRUE )
If ApplyTilde is set to True,
the tilde will be processed. ApplyTilde
is True by default in this method.
|
| long IDAutomation_Universal_C128A
(char *DataToEncode, char *ReturnVal, long &Size) |
IDAutomation Uni |
Formats output
to set A of Code-128. Use caution with this option because any
lowercase character creates a
method. Use the letter "i" for a tab and "m" for a return.
For most purposes, it is better to use the
C128() method instead of this one. |
| long IDAutomation_Universal_C128B
(char *DataToEncode, char *ReturnVal, long &Size) |
IDAutomation Uni |
Formats output
to Code-128, character set B. For most purposes, it is better
to use the C128() method instead
of this one. |
| long IDAutomation_Universal_C128C(char
*DataToEncode, char *ReturnVal, long &Size) |
IDAutomation Uni |
This code128
method "interleaves" even numbers into pairs for high density.
An even number of digits is required. For most purposes, it
is better to use the C128() method
instead of this one. |
| long IDAutomation_Universal_C39(char
*DataToEncode, double N_Dimension, long &IncludeCheckDigit,
char *ReturnVal, long &Size) |
IDAutomation Uni |
Formats the
output for bar-coding in Code 3 of 9 with the universal font.
A MOD 43 checksum will be calculated if
IncludeCheckDigit is true.
For example: IDAutomation_Uni_C39
("123456789", 3, TRUE ) |
| long IDAutomation_Universal_Codabar(char
*DataToEncode, double N_Dimension, char *CodabarStart, char
*CodabarStop, char *ReturnVal, long &Size) |
IDAutomation Uni |
Creates Codabar
(aka NW7) with the universal font. StartChar and StopChar are
also required as the start and stop characters. Valid start
and stop characters are A, B, C and D. |
| long IDAutomation_Universal_I2of5(char
*DataToEncode, double N_Dimension, long &IncludeCheckDigit,
char *szReturnVal, long &Size) |
IDAutomation Uni |
This method
"interleaves" numbers into pairs for high density without check
digits and formats the return string to the universal font.
An even number of digits is required. A MOD 10 checksum will
be calculated if IncludeCheckDigit
is true. |
| long IDAutomation_Universal_MSI(char
*DataToEncode, double N_Dimension, long &IncludeCheckDigit,
char *szReturnVal, long &Size) |
IDAutomation Uni |
Formats output
for barcoding in the MSI/Plessey symbology. A MOD 10 checksum
will be calculated if IncludeCheckDigit
is true. |
| long IDAutomation_Universal_OneCode(char
*DataToEncode, char *ReturnVal, long &Size) |
IDAutomation Uni
or
IDAutomationPOSTNET |
This method
formats a barcode for
USPS Intelligent Mail and is compatible with the IDAutomation
POSTNET
font as well as the XS, S or M size of the
Universal
Barcode Font. DataToEncode is a single string according
to the
Intelligent Mail Barcode FAQ.
Note: After the release of this product, the USPS renamed
the OneCode Solution to the
Intelligent Mail Barcode. The encoding of each is the same,
only the name has changed. The selection of "OneCode" will generate
the same barcode as "Intelligent Mail". |
| long IDAutomation_Universal_Planet(char
*DataToEncode, long &IncludeCheckDigit, char *ReturnVal, long
&Size) |
IDAutomation Uni |
Because this
barcode type has a specific height requirement, this method
only works with the XS, S or M size of the Universal Font.
XS is the normal version, S has the bars narrow
by 10% and the M font has the bars narrow by 20%. DataToEncode
is a single string of Zip, Zip + 4 or Zip + 4 + Delivery Point.
A MOD 10 checksum will be calculated if
IncludeCheckDigit is true. |
| long IDAutomation_Universal_Postnet(char
*DataToEncode, long &IncludeCheckDigit, char *ReturnVal, long
&Size) |
IDAutomation Uni |
Because this
barcode type has a specific height requirement, this method
only works with the XS, S or M size of the Universal Font.
XS is the normal version, S has the bars narrow
by 10% and the M font has the bars narrow by 20%. DataToEncode
is a single string of Zip, Zip + 4 or Zip + 4 + Delivery Point.
A MOD 10 checksum will be calculated if
IncludeCheckDigit is true. |
| long IDAutomation_Universal_UCC128(char
*DataToEncode, char *ReturnVal, long &iSize) |
IDAutomation Uni |
This symbology
option automatically encodes the FNC1 character in set C as
required for UCC-128 barcodes. All methods of
ApplyTilde are enabled in this method
for calculating the required MOD 10 check digit and cannot be
disabled, for example:
IDAutomation_Uni_C128 ("00000123455555555558"
& "~m19" ) For more information, please visit the
UCC/EAN Barcode FAQ. |
| long IDAutomation_Universal_MODU10(char
*DataToEncode, char *ReturnVal, long &Size) |
not applicable |
A MOD 10 check
digit is returned. This is useful in calculating check digits
for UCC/EAN 128 barcodes where a MOD check digit is needed.
More information about
UCC/EAN-128 is located here. |
All
methods listed below are preceded with IDAutomation_DataBar_
and are only to be used with the
IDAutomation
DataBar Barcode Font |
| Methods in this section
are all preceded with IDAutomation_DataBar_ |
|
Font to use |
Notes |
| long
DataBar (char *DataToEncode, char *ReturnVal, long &iSize) |
IDAutomation DataBar |
The 14 characters
in GS1
DataBar are the 13 data characters plus an implied check
digit. The check digit is not actually encoded in the barcode
(as per the GS1 DataBar standards), but should be included as
part of the DataToEncode parameter. If it is not known, a zero
may be substituted. |
| long
DataBarExpanded (char *DataToEncode, long &Segments, char
*ReturnVal, long &iSize) |
IDAutomation DataBar |
This method
is used for two symbologies,
Expanded and Expanded Stacked. For Expanded barcodes set
Segments to 22, for Expanded Stacked, Segments can be set to
an even value in the range of 2-18. |
| long
DataBarLimited (char *DataToEncode, char *ReturnVal, long
&iSize) |
IDAutomation DataBar |
Refer to the
DataBar Limited specification. |
| long
DataBarStacked (char *DataToEncode, char *ReturnVal, long
&iSize) |
IDAutomation DataBar |
Refer to the
DataBar Stacked specification. |
| long
DataBarStackedOmnidirectional (char *DataToEncode, char
*ReturnVal, long &iSize) |
IDAutomation DataBar |
Refer to the
DataBar Stacked Omnidirectional specification. |
Description of the parts of the methods:
- DataToEncode - this is a string
value that represents the data being encoded.
- N_Dimension - determines the
width of the wide bars, which is a multiple of the X dimension.
Valid values are 2, 2.5 and 3. The default is 2. The X dimension
is determined by the font point size.
- IncludeCheckDigit - a
Boolean value that determines whether a check digit should be automatically
calculated and included for the DataToEncode.
- ApplyTilde -
when ApplyTilde is enabled in Code 128 with the Auto character set,
the format ~ddd may be used to specify the ASCII code of the character
to be encoded and
several other tilde options are enabled.
|