////////////////////////////// Export Function //////////////////////////////
#pragma comment (lib, "..\\Lib\\P11CPCL.lib")	// Reference Library.
#define	SEWOO_LIBRARY	__declspec(dllimport)

SEWOO_LIBRARY	long __stdcall	OpenPort(LPCTSTR strPortName, long BaudRate);
SEWOO_LIBRARY	long __stdcall	ClosePort();
SEWOO_LIBRARY	long __stdcall	PrinterCheck();
SEWOO_LIBRARY	long __stdcall	status();
SEWOO_LIBRARY	long __stdcall	SetForm(LPCTSTR HorizonOffset, long XResol, long YResol, LPCTSTR LabelHeight, long Quantity);
SEWOO_LIBRARY	long __stdcall	PrintForm();
SEWOO_LIBRARY	long __stdcall	SetMeasure(long Measure);
SEWOO_LIBRARY	long __stdcall	SetJustification(long Justify);
SEWOO_LIBRARY	long __stdcall	CPCLPrintText(long Rotation, long FontType, long FontSize, LPCTSTR PrintX, LPCTSTR PrintY, LPCTSTR Data, long count);
SEWOO_LIBRARY	long __stdcall	SetConcat(long ConcatMode, long PrintX, long PrintY);
SEWOO_LIBRARY	long __stdcall	ConcatText(long FontType, long FontSize, long Offset, LPCTSTR Data);
SEWOO_LIBRARY	long __stdcall	ResetConcat();
SEWOO_LIBRARY	long __stdcall	SetMultiLine(long LineHeight);
SEWOO_LIBRARY	long __stdcall	MultiLineText(long Rotation, long FontType, long FontSize, long PrintX, long PrintY);
SEWOO_LIBRARY	long __stdcall	MultiLineData(LPCTSTR Data);
SEWOO_LIBRARY	long __stdcall	ResetMultiLine();
SEWOO_LIBRARY	long __stdcall	SetMagnify(long Width, long Height);
SEWOO_LIBRARY	long __stdcall	ResetMagnify();
SEWOO_LIBRARY	long __stdcall	SetFormMode();
SEWOO_LIBRARY	long __stdcall	SetJournalMode();
SEWOO_LIBRARY	long __stdcall	CPCLPrintBarCode(long Rotation, long BarCodeType, long NB, long Ratio, long BarHeight, LPCTSTR PrintX, LPCTSTR PrintY, LPCTSTR Data, long count);
SEWOO_LIBRARY	long __stdcall	PrintBox(long xs, long ys, long xx, long yx, long Thickness);
SEWOO_LIBRARY	long __stdcall	PrintLine(long xs, long ys, long xx, long yx, long Thickness);
SEWOO_LIBRARY	long __stdcall	InverseLine(long xs, long ys, long xx, long yx, long Thickness);
SEWOO_LIBRARY	long __stdcall	SetPattern(long PatternNum);
SEWOO_LIBRARY	long __stdcall	PrintGraphic(long BytesWidth, long DotHeight, LPCTSTR PrintX, LPCTSTR PrintY, PCHAR Data);
SEWOO_LIBRARY	long __stdcall	SetContrast(long Darkness);
SEWOO_LIBRARY	long __stdcall	SetPageWidth(long PageWidth);
SEWOO_LIBRARY	long __stdcall	CPCLPrintImage(LPCTSTR ImageName, LPCTSTR PrintX, LPCTSTR PrintY);
SEWOO_LIBRARY	long __stdcall	SetSpeed(long Speed);
SEWOO_LIBRARY	long __stdcall	SetTone(long Tone);
SEWOO_LIBRARY	long __stdcall	CPCLSetBarCode(long FontNum, long FontSize, LPCTSTR Offset);
SEWOO_LIBRARY	long __stdcall	CPCL2DPrintBarCode(long Rotation, long BarCodeType, LPCTSTR PrintX, LPCTSTR PrintY, long UnitWidth, long UnitHeight, long Column, long SecurityLevel, LPCTSTR Data);
SEWOO_LIBRARY	long __stdcall	CPCLPrintBitmap(LPCTSTR ImageName, LPCTSTR PrintX, LPCTSTR PrintY);
SEWOO_LIBRARY	long __stdcall	CPCLPrintText2Image(long Orientation, LPCTSTR PrintX, LPCTSTR PrintY, LPCTSTR FontFace, long FontStyle, int FontSize, LPCTSTR TextData, int ReversePrint);

#define LK_SUCCESS  		0
#define LK_CREATE_ERROR  	1
#define LK_NOT_OPENED  		2

// Printer Status flag
#define LK_STS_NORMAL  		0
#define LK_STS_BUSY	 	1
#define LK_STS_PAPER_EMPTY 	2
#define LK_STS_COVER_OPEN  	4
#define LK_STS_BATTERY_LOW  	8

// Measure
#define LK_CPCL_DOTS  		0
#define LK_CPCL_MILLI	 	1
#define LK_CPCL_CENTI	 	2
#define LK_CPCL_INCH	  	3

// Justification
#define LK_CPCL_LEFT  		0
#define LK_CPCL_CENTER	 	1
#define LK_CPCL_RIGHT	 	2

// Rotation
#define LK_CPCL_NO_ROTATION	0
#define LK_CPCL_90_ROTATION 	1
#define LK_CPCL_180_ROTATION	2
#define LK_CPCL_270_ROTATION 	3

// Concatenation
#define LK_CPCL_CONCAT 		0
#define LK_CPCL_VCONCAT	 	1

// Magnification
#define LK_CPCL_TXT_1WIDTH 	0
#define LK_CPCL_TXT_2WIDTH 	1
#define LK_CPCL_TXT_3WIDTH 	2
#define LK_CPCL_TXT_4WIDTH 	3
#define LK_CPCL_TXT_5WIDTH 	4
#define LK_CPCL_TXT_6WIDTH 	5
#define LK_CPCL_TXT_7WIDTH 	6
#define LK_CPCL_TXT_8WIDTH 	7
#define LK_CPCL_TXT_9WIDTH 	8
#define LK_CPCL_TXT_10WIDTH 	9
#define LK_CPCL_TXT_11WIDTH 	10
#define LK_CPCL_TXT_12WIDTH 	11
#define LK_CPCL_TXT_13WIDTH 	12
#define LK_CPCL_TXT_14WIDTH 	13
#define LK_CPCL_TXT_15WIDTH 	14
#define LK_CPCL_TXT_16WIDTH 	15

#define LK_CPCL_TXT_1HEIGHT 	0
#define LK_CPCL_TXT_2HEIGHT 	1
#define LK_CPCL_TXT_3HEIGHT 	2
#define LK_CPCL_TXT_4HEIGHT 	3
#define LK_CPCL_TXT_5HEIGHT 	4
#define LK_CPCL_TXT_6HEIGHT 	5
#define LK_CPCL_TXT_7HEIGHT 	6
#define LK_CPCL_TXT_8HEIGHT 	7
#define LK_CPCL_TXT_9HEIGHT 	8
#define LK_CPCL_TXT_10HEIGHT 	9
#define LK_CPCL_TXT_11HEIGHT 	10
#define LK_CPCL_TXT_12HEIGHT 	11
#define LK_CPCL_TXT_13HEIGHT 	12
#define LK_CPCL_TXT_14HEIGHT 	13
#define LK_CPCL_TXT_15HEIGHT 	14
#define LK_CPCL_TXT_16HEIGHT 	15

// one-dimension barcode
#define LK_CPCL_BCS_39	 	0
#define LK_CPCL_BCS_39C 	1
#define LK_CPCL_BCS_39F 	2
#define LK_CPCL_BCS_39FC 	3
#define LK_CPCL_BCS_93	 	4
#define LK_CPCL_BCS_128 	5
#define LK_CPCL_BCS_EAN128 	6
#define LK_CPCL_BCS_CODABAR 	7
#define LK_CPCL_BCS_CODABARC 	8
#define LK_CPCL_BCS_EAN8 	9
#define LK_CPCL_BCS_EAN82 	10
#define LK_CPCL_BCS_EAN85 	11
#define LK_CPCL_BCS_EAN13 	12
#define LK_CPCL_BCS_EAN132 	13
#define LK_CPCL_BCS_EAN135 	14
#define LK_CPCL_BCS_I2OF5 	15
#define LK_CPCL_BCS_POSTNET 	16
#define LK_CPCL_BCS_UPCA 	17
#define LK_CPCL_BCS_UPCA2 	18
#define LK_CPCL_BCS_UPCA5 	19
#define LK_CPCL_BCS_UPCE 	20
#define LK_CPCL_BCS_UPCE2 	21
#define LK_CPCL_BCS_UPCE5 	22
#define LK_CPCL_BCS_MSI 	23
#define LK_CPCL_BCS_MSI1C 	24
#define LK_CPCL_BCS_MSI2C 	25
#define LK_CPCL_BCS_MSI11C 	26
#define LK_CPCL_BCS_PLUS2 	27
#define LK_CPCL_BCS_PLUS5 	28

// two-dimension barcode
#define LK_CPCL_BCS_PDF417 	0
#define LK_CPCL_BCS_MAXICODE 	1

// Barcode Ratio.
#define LK_CPCL_BCS_0RATIO 	1
#define LK_CPCL_BCS_1RATIO 	2
#define LK_CPCL_BCS_2RATIO 	3
#define LK_CPCL_BCS_3RATIO 	4
#define LK_CPCL_BCS_4RATIO 	5
#define LK_CPCL_BCS_20RATIO 	6
#define LK_CPCL_BCS_21RATIO 	7
#define LK_CPCL_BCS_22RATIO 	8
#define LK_CPCL_BCS_23RATIO 	9
#define LK_CPCL_BCS_24RATIO 	10
#define LK_CPCL_BCS_25RATIO 	11
#define LK_CPCL_BCS_26RATIO 	12
#define LK_CPCL_BCS_27RATIO 	13
#define LK_CPCL_BCS_28RATIO 	14
#define LK_CPCL_BCS_29RATIO 	15
#define LK_CPCL_BCS_30RATIO 	16

// pattern.
#define LK_CPCL_DEFAULT_PATTERN 	1
#define LK_CPCL_HORIZON_PATTERN 	2
#define LK_CPCL_VERTICAL_PATTERN 	3
#define LK_CPCL_RDIAGON_PATTERN 	4
#define LK_CPCL_LDIAGON_PATTERN 	5
#define LK_CPCL_SQUARE_PATTERN 		6
#define LK_CPCL_CROSS_PATTERN 		7

// contrast.
#define LK_CPCL_CONT_DEFAULT 	0
#define LK_CPCL_CONT_MEDIUM 	1
#define LK_CPCL_CONT_DARK 	2
#define LK_CPCL_CONT_VERY_DARK 	3

