
#define MSG_RECEIVE_CHECK    _T("WOOSIM_PRT_OK")

/****************************************************************************
	CONST DEFINE
****************************************************************************/
//Message used in Protocol mode
#define FRAME_START			0xc0			// Frame Start
#define FRAME_END           0xc1			// Frame End
#define ACK					0x06			// 
#define NACK				0x15			//
#define ENQ					0x05			//
#define DATA				0x44			// 
#define STATUS_REQUEST		0x51			//Inquiry of printer status
#define STATUS_ANSWER		0x53			//Response of printer status
#define EOT					0x04			//
#define ETX					0x03			//
#define CAN					0x18			// 
#define MSR_FAIL			0x4d			// 

#define INSERT_BYTE			0x7d			// 0xc0,0xc1,0x7d case 0x7d insert.
#define XOR_BYTE            0x20			// after XOR


//Set buffer size
#define BUFF_SIZE				0x19000		// Buffer size
#define TEMP_BUFF_SIZE			0x19000		// Temporary buffer size
#define MSR_BUFF_SIZE			0x400		// MSR buffer size


// Return Message
//serial, Bluetooth 
#define SUCCESS									1
#define ALREADY_OPENED							-1
#define UNABLE_TO_OPEN_THE_PORT					-2
#define UNABLE_TO_CONFIGURE_THE_SERIAL_PORT		-3 
#define UNABLE_TO_SET_THE_TIMEOUT_PARAMETERS	-4
#define NO_RESPONSE_FROM_PRINTER				-5

// WLAN
#undef SOCKET_ERROR
#define SOCKET_ERROR							-1
#define CONNECT_FAIL							-2
#define ALREADY_CONNECTED						-3


#define NOT_OPEN_THE_PORT						-11
#define BUFFER_OVERFLOW                         -12
#define OPERATOR_ERROR							-13

//barcode type
#define UPCA									65
#define UPCE									66
#define EAN13									67
#define EAN8									68
#define CODE39									69
#define ITF										70
#define CODABAR									71
#define CODE93									72
#define CODE128									73

//printer width
#define _2INCH									384
#define _3INCH									576
#define _4INCH									832

/****************************************************************************
	END 
****************************************************************************/



/******************************************************************************************
	IMPORT
******************************************************************************************/
extern "C" __declspec(dllimport) int InitPrinter(TCHAR *sPortName, int iBaudRate=57600,BOOL bProtocol=TRUE);
extern "C" __declspec(dllimport) int InitWlanPrinter(TCHAR *sIP_ADDR, int iPortNum, int iTimeout,BOOL bProtcol);
extern "C" __declspec(dllimport) BOOL ClosePrinter();	
extern "C" __declspec(dllimport) int ControlCommand(BYTE *Cmds, int iLength); 
extern "C" __declspec(dllimport) int SaveSpool(TCHAR *sData, int iFontValue=0, BOOL bEmphasis = FALSE);					
extern "C" __declspec(dllimport) int PrintSpool(BOOL bDelete_Spool = TRUE);
extern "C" __declspec(dllimport) void ClearSpool();
extern "C" __declspec(dllimport) void CardRead(BOOL bTrack2 = TRUE);
extern "C" __declspec(dllimport) void CardCancel();
extern "C" __declspec(dllimport) int BmpSaveSpool(TCHAR* sBmpFilePath,int iXPosition, int iYPosition);
extern "C" __declspec(dllimport) int BarcodeSaveSpool(BYTE ucBarcodeType, BYTE ucBarWidth, BYTE ucBarHeight, BOOL HRI_On,
													  TCHAR* BarcodeData, int iPrtWidth,int iPrtHeight,int iXPos);

