Native Windows Barcode DLL for
IDAutomation Bar Code Fonts
IDAutomation's Native Windows Bar Code DLL was written in
C++, has no COM or MFC dependencies and can 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, MSI / Plessey and USPS
Intelligent Mail
(AKA OneCode
Solution 4-State Customer Barcode) fonts. This font DLL also contains methods
for 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 bar code font tools:
Microsoft Office Macros and VBA
| Crystal Reports
UFL |
Microsoft
Reporting Services
|
Over 70% of Fortune
100 companies use IDAutomation's products to automate their businesses.
|
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 the licensed barcode
fonts. Redistribution of IDAutomation's fonts and components requires a
Developer License.
|
The
API of the Native Windows DLL
|
The API of the Native Windows DLL should only be used by advanced programmers
that have an understanding of how Windows DLLs work. 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
DLL and the methods listed. The differences
are as follows:
- The method names all begin with IDAutomation_Universal_
instead of IDAutomation_Uni_.
- Return value - the methods return 0 for success or a non-zero
value if the method fails.
- Output - this is a string value (passed by reference) that will be populated by
the DLL with the encoded data.
- Output size - this is an integer value that 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 Method 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 Method 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
Dim Data As String 'Data to barcode
Data = "Testing"
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(Data, L_AT , myOut, iSize)
'Write out the output string, taking only the
number of characters necessary from the defined string
Debug.Write = Mid(myOut, 1, iSize)
End Method
|
The following
bar code 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. All the methods listed below are preceded with
IDAutomation_. Methods beginning with
IDAutomation_Universal_ are only to
be used with the
IDAutomation Universal Barcode Font Advantage™.
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.
|
Method name |
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 bar code
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 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 fonts. MOD 10 checksums are required by USPS 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) |
IDAutomationC39
or
IDAutomationHC39 |
Formats the output to print using
Code 3 of 9 fonts. |
| long IDAutomation_Code39Mod43 (char *DataToEncode, char *ReturnVal,
long &Size) |
IDAutomationC39
or
IDAutomationHC39 |
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 fonts. |
| long IDAutomation_Codabar (char *DataToEncode, char *ReturnVal,
long &Size) |
IDAutomationCB |
Formats the output to print using
Codabar 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 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 the
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_ |
| 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
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 |
NOTE: Because this bar-code
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 |
NOTE: Because this bar-code
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 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. |
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.
© Copyright 2001-2008 IDAutomation.com, Inc., All Rights
Reserved.
Legal Notices.
|
Over 70% of Fortune 100
companies use IDAutomation's products to automate their businesses.
|
|