support
space
Call Barcode Dynamic Link Library From VC++


In order to create barcode in your own application,
you need Barcodesoft true type fonts and cruflbcs.dll .

Some legacy Windows applications are unable to call COM objects.
However, these applications can still call Dynamic Link Library (cruflBCS.dll)

If you download and install the demo of Barcodesoft product, you will find crUFLBCS.dll
at C:\Program Files\Common Files\Barcodesoft\FontUtil\ folder.

If you don't find cruflbcs.dll on your computer, please download it from Barcode DLL .

The following code snippet shows how to call a Dynamic Link Library function to create barcode.

Apply an appropriate font typeface to 'szReturn', and you get barcode generated.

You can use the following code snippet to call dynamic link library (DLL) cruflBCS.dll

typedef int (*LPFNDLLFUNC)(char*, char*);
char modulePath[] = "cruflbcs.dll";
HINSTANCE m_hLibInstance = LoadLibrary( modulePath );
if (m_hLibInstance != NULL)
{
lpfnDllFunc = (LPFNDLLFUNC)GetProcAddress(m_hLibInstance, "BCSPDF417Encode");
if (!lpfnDllFunc)
FreeLibrary(m_hLibInstance);
else
nReturn = lpfnDllFunc(pszInpara, szReturn);
}
FreeLibrary(m_hLibInstance);

The Dynamic Link Library (DLL) cruflBCS.dll exports the following functions:


Code39:

BCSCode39(char* strToEncode, char* strOutput);
BCSCode39Check(char* strToEncode, char* strOutput);
BCSUSSCode39(char* strToEncode, char* strOutput);
BCSCode39Ext(char* strToEncode, char* strOutput);

Code128:

BCSCode128A(char* strToEncode, char* strOutput);
BCSCode128B(char* strToEncode, char* strOutput);
BCSCode128C(char* strToEncode, char* strOutput);
BCSUSS128(char* strToEncode, char* strOutput);
BCSUCCEAN128(char* strToEncode, char* strOutput);

UPC EAN:

BCSUPCA(char* strToEncode, char* strOutput);
BCSUPCE(char* strToEncode, char* strOutput);
BCSEAN13(char* strToEncode, char* strOutput);
BCSEAN8(char* strToEncode, char* strOutput);
BCSBookland(char* strToEncode, char* strOutput);

Data Matrix:

BCSDataMatrixEncode(char* strToEncode, char* strOutput);

PDF417:

BCSPDF417Encode(char* strToEncode, char* strOutput);

QR Code:

BCSQRCodeEncode(char* strToEncode, char* strOutput);

Aztec:

BCSAztecEncode(char* strToEncode, char* strOutput);

Code16K:

BCSCode16KEncode(char* strToEncode, char* strOutput);

Interleaved 2 of 5:

BCSI25(char* strToEncode, char* strOutput);
BCSI25Check(char* strToEncode, char* strOutput);

Postnet:

BCSPOSTNET(char* strToEncode, char* strOutput);

Code25:

BCSCode25(char* strToEncode, char* strOutput);
BCSCode25Check(char* strToEncode, char* strOutput);

Code11:

BCSCode11(char* strToEncode, char* strOutput);

Code93:

BCSCode93(char* strToEncode, char* strOutput);

MSI/Plessey:

BCSMSI(char* strToEncode, char* strOutput);

Codabar:

BCSCodabar(char* strToEncode, char* strOutput);

Telepen:

BCSTelepen(char* strToEncode, char* strOutput);
BCSTelepenNumeric(char* strToEncode, char* strOutput);

space
space