////////////////////////////// Export Function //////////////////////////////
#pragma comment (lib, "..\\Lib\\P30CPCL.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);
SEWOO_LIBRARY	long __stdcall	SetMedia(long Mode);

#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_QRCODE	1
#define LK_CPCL_BCS_DATAMATRIX	2

// 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

// QRCode Error Correction Level.
#define	LK_QRCODE_EC_LEVEL_L	0
#define	LK_QRCODE_EC_LEVEL_M	1
#define	LK_QRCODE_EC_LEVEL_Q	2
#define	LK_QRCODE_EC_LEVEL_H	3

// QRCode Symbol version.
#define	LK_QRCODE_VERSION_00	0 // Auto.
#define	LK_QRCODE_VERSION_01	1 // Version 1
#define	LK_QRCODE_VERSION_02	2 // Version 2
#define	LK_QRCODE_VERSION_03	3 // Version 3
#define	LK_QRCODE_VERSION_04	4 // Version 4
#define	LK_QRCODE_VERSION_05	5 // Version 5
#define	LK_QRCODE_VERSION_06	6 // Version 6
#define	LK_QRCODE_VERSION_07	7 // Version 7
#define	LK_QRCODE_VERSION_08	8 // Version 8
#define	LK_QRCODE_VERSION_09	9 // Version 9
#define	LK_QRCODE_VERSION_10	10 // Version 10
#define	LK_QRCODE_VERSION_11	11 // Version 11
#define	LK_QRCODE_VERSION_12	12 // Version 12
#define	LK_QRCODE_VERSION_13	13 // Version 13
#define	LK_QRCODE_VERSION_14	14 // Version 14
#define	LK_QRCODE_VERSION_15	15 // Version 15
#define	LK_QRCODE_VERSION_16	16 // Version 16
#define	LK_QRCODE_VERSION_17	17 // Version 17
#define	LK_QRCODE_VERSION_18	18 // Version 18
#define	LK_QRCODE_VERSION_19	19 // Version 19
#define	LK_QRCODE_VERSION_20	20 // Version 20
#define	LK_QRCODE_VERSION_21	21 // Version 21
#define	LK_QRCODE_VERSION_22	22 // Version 22
#define	LK_QRCODE_VERSION_23	23 // Version 23
#define	LK_QRCODE_VERSION_24	24 // Version 24
#define	LK_QRCODE_VERSION_25	25 // Version 25
#define	LK_QRCODE_VERSION_26	26 // Version 26
#define	LK_QRCODE_VERSION_27	27 // Version 27
#define	LK_QRCODE_VERSION_28	28 // Version 28
#define	LK_QRCODE_VERSION_29	29 // Version 29
#define	LK_QRCODE_VERSION_30	30 // Version 30
#define	LK_QRCODE_VERSION_31	31 // Version 31
#define	LK_QRCODE_VERSION_32	32 // Version 32
#define	LK_QRCODE_VERSION_33	33 // Version 33
#define	LK_QRCODE_VERSION_34	34 // Version 34
#define	LK_QRCODE_VERSION_35	35 // Version 35
#define	LK_QRCODE_VERSION_36	36 // Version 36
#define	LK_QRCODE_VERSION_37	37 // Version 37
#define	LK_QRCODE_VERSION_38	38 // Version 38
#define	LK_QRCODE_VERSION_39	39 // Version 39
#define	LK_QRCODE_VERSION_40	40 // Version 40

// DATAMATRIX Error Correction Level.
#define	LK_DATAMATRIX_EC_LEVEL_0	0
#define	LK_DATAMATRIX_EC_LEVEL_50	50
#define	LK_DATAMATRIX_EC_LEVEL_80	80
#define	LK_DATAMATRIX_EC_LEVEL_100	100
#define	LK_DATAMATRIX_EC_LEVEL_140	140
#define	LK_DATAMATRIX_EC_LEVEL_200	200

// True-Type Font Style
#define	LK_TTF_THIN		0
#define	LK_TTF_EXTRALIGHT	1
#define	LK_TTF_LIGHT		2
#define	LK_TTF_NORMAL		3
#define	LK_TTF_REGULAR		4
#define	LK_TTF_MEDIUM		5
#define	LK_TTF_SEMIBOLD		6
#define	LK_TTF_EXTRABOLD	7
#define	LK_TTF_HEAVY		8
#define	LK_TTF_ITALIC		0x10
#define	LK_TTF_UNDERLINE	0x20

// True-Type Font Reverse Print
#define	LK_TTF_REVERSE_NO	0
#define	LK_TTF_REVERSE_YES	1
