#define MSG_RECEIVE_CHECK    _T("WOOSIM_PRT_OK")

/****************************************************************************
CONST DEFINE
****************************************************************************/
//Message used DefWinProc
#define DATA									0x44 // 
#define STATUS_ANSWER							0x53 //Response of printer status

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

//Return Message
#define SUCCESS									 1
#define ALREADY_OPENED							-1
#define NO_RESPONSE_FROM_PRINTER				-5
#define TIMEOUT									-7
#define NOT_OPEN_THE_PORT						-11

//Serial, Bluetooth Err message
#define UNABLE_TO_OPEN_THE_PORT					-2
#define UNABLE_TO_CONFIGURE_THE_SERIAL_PORT		-3 
#define UNABLE_TO_SET_THE_TIMEOUT_PARAMETERS	-4

//Wireless Err message
#undef SOCKET_ERROR
#define SOCKET_ERROR							-2
#define CONNECT_FAIL							-3

//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 _1INCH									192
#define _2INCH									384
#define _3INCH									576
#define _4INCH									832

//MCU version
#define MCU_RX									2
#define MCU_ARM									1
#define MCU_M16C								0


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



/******************************************************************************************
IMPORT
******************************************************************************************/
//1. Printable Data Handling APIs
extern "C" __declspec(dllimport) void ClearSpool();
extern "C" __declspec(dllimport) void CompressedBmpSaveSpool(TCHAR *bmpFilePath); 
extern "C" __declspec(dllimport) int ControlCommand(BYTE *Cmds, int iLength); 
extern "C" __declspec(dllimport) void DataMatrixSaveSpool(int width, int height, int module, TCHAR *barcodeData);
extern "C" __declspec(dllimport) void GS1DatabarSaveSpool(int type, int n, TCHAR * barcodeData);
extern "C" __declspec(dllimport) void LoadLogoSaveSpool(int n);
extern "C" __declspec(dllimport) void MaxicodeSaveSpool(int mode, TCHAR *barcodeData);
extern "C" __declspec(dllimport) void MicroPDF417SaveSpool(int width, int column, int row, int ratio, TCHAR *barcodeData, BOOL HRI);
extern "C" __declspec(dllimport) void NormalBmpSaveSpool(TCHAR* bmpFilePath);
extern "C" __declspec(dllimport) void OneDimensionBarcodeSaveSpool(BYTE ucBarcodeType,
											int ucBarWidth, int ucBarHeight, BOOL HRI_On, TCHAR* barcodeData);
extern "C" __declspec(dllimport) void Page_DotFeed(int dots);
extern "C" __declspec(dllimport) void Page_DrawBox(int iXPos, int iYPos, int width, int height, int thickness);
extern "C" __declspec(dllimport) void Page_DrawLine(int x, int y, int x2, int y2, int thickness);
extern "C" __declspec(dllimport) void Page_DrawEllipse(int x, int y, int A_length, int B_length, int thickness);
extern "C" __declspec(dllimport) void Page_LineFeed(int lines);
extern "C" __declspec(dllimport) void Page_Newline();	
extern "C" __declspec(dllimport) void Page_Print();
extern "C" __declspec(dllimport) void Page_Print_StandardMode();
extern "C" __declspec(dllimport) void PDF417SaveSpool(int width, int column, int level, int ratio, TCHAR *barcodeData, BOOL HRI);
extern "C" __declspec(dllimport) void PrintData();
extern "C" __declspec(dllimport) void PrintDotFeed(int dots);
extern "C" __declspec(dllimport) void PrintLineFeed(int lines);
extern "C" __declspec(dllimport) int PrintSpool(BOOL bDelete_Spool = TRUE);
extern "C" __declspec(dllimport) int PrintSpoolForTTF(TCHAR* sData,BYTE iXFontSize, BYTE iYFontSize);
extern "C" __declspec(dllimport) void QRCodeSaveSpool(int version, TCHAR level, int module, TCHAR *barcodeData);
extern "C" __declspec(dllimport) void TextSaveSpool(TCHAR *textData);
extern "C" __declspec(dllimport) void TruncatedPDF417SaveSpool(int width, int column, int level, int ratio, TCHAR *barcodeData, BOOL HRI)	;


//2. Printer Mode & Setting APIs
extern "C" __declspec(dllimport) void GetPrinterModelName();
extern "C" __declspec(dllimport) void GetFirmwareVersion();
extern "C" __declspec(dllimport) void GetPrinterStatus(int iTimeoutMsec);
extern "C" __declspec(dllimport) void InitLineSpace();
extern "C" __declspec(dllimport) void InitPageMode(int iXPos, int iYPos, int width, int height);
extern "C" __declspec(dllimport) void InitPrinterStatus();
extern "C" __declspec(dllimport) void Page_ClearCurrentData();
extern "C" __declspec(dllimport) void Page_SetArea(int iXPos,int iYPos, int width, int height);
extern "C" __declspec(dllimport) void Page_SetDirection(int n);
extern "C" __declspec(dllimport) void Page_SetPosition(int iXPos, int iYPos);
extern "C" __declspec(dllimport) void Page_SetStandardMode();
extern "C" __declspec(dllimport) void SetAbsPosition(int distance);
extern "C" __declspec(dllimport) void SetCharCodeTable(int n, int MCU);
extern "C" __declspec(dllimport) void SetCharSpace(int n);
extern "C" __declspec(dllimport) void SetFontForTTF(TCHAR *ttfFile);
extern "C" __declspec(dllimport) void SetFontSize(int n);
extern "C" __declspec(dllimport) void SetLineSpace(int n);
extern "C" __declspec(dllimport) void SetPageMode();
extern "C" __declspec(dllimport) void SetTextAlignment(int n);
extern "C" __declspec(dllimport) void SetTextStyle(int underline, BOOL emphasize, int width, int height, BOOL reverse);
extern "C" __declspec(dllimport) void SetUpsideDown(BOOL set);

//3. Misc Device Handling APIs
extern "C" __declspec(dllimport) void CancelMSRMode();//============
extern "C" __declspec(dllimport) BOOL ClosePrinterConnection();
extern "C" __declspec(dllimport) void CancelSCRMode();
extern "C" __declspec(dllimport) int ConnectSerialPrinter(TCHAR *sPortName, int iBaudRate=57600,int iTimeoutMsec=200, BOOL bProtocol=FALSE);
extern "C" __declspec(dllimport) int ConnectWirelessPrinter(TCHAR *sIP_ADDR, int iPortNum, int iTimeoutMsec, BOOL bProtcol = FALSE);//============
extern "C" __declspec(dllimport) void CutPaper(int mode);
extern "C" __declspec(dllimport) void EnterMSRMode(int n);
extern "C" __declspec(dllimport) void EnterSCRMode();
extern "C" __declspec(dllimport) void FeedToMark();
extern "C" __declspec(dllimport) void SetPositionFromMark(int distance);













