//#pragma once

#ifndef NMKPCL_H
#define NMKPCL_H

//#include <stdlib.h>
#ifndef MYDLL_EXPORTS
#define MYDLL_EXPORTS
#endif

#ifdef MYDLL_EXPORTS
#define MYDLL_API __declspec(dllexport)
#else
#define MYDLL_API __declspec(dllimport)
#endif

extern "C" __declspec(dllexport) int _stdcall NM_OpenBlx(char* filePath);
extern "C" __declspec(dllexport) int _stdcall NM_BlxPrint(int args_cnt,...);
extern "C" __declspec(dllexport) int _stdcall NM_BlxPrintEx(int printcount,int args_cnt,...);
extern "C" __declspec(dllexport) int _stdcall NM_PrintBlx(char* filePath,int args_cnt,...);
//设置组件的内容
extern "C" __declspec(dllexport) int _stdcall NM_UpdateText(char* componentName,char* content);
extern "C" __declspec(dllexport) int _stdcall NM_UpdateCode(char* componentName,char* content);
extern "C" __declspec(dllexport) int _stdcall NM_UpdatePicture(char* componentName,char* buf,int size);


//打开端口
extern "C" __declspec(dllexport) int _stdcall NM_OpenPort(int portType);
extern "C" __declspec(dllexport) int _stdcall NM_OpenNet(const unsigned int ip,const int port);
extern "C" __declspec(dllexport) int _stdcall NM_OpenPortEx(int portType,LPVOID pCb);
extern "C" __declspec(dllexport) int _stdcall NM_OpenNetEx(const unsigned int ip,const int port,LPVOID pCb);

extern "C" __declspec(dllexport) void _stdcall NM_ClosePort(void);
extern "C" __declspec(dllexport) int _stdcall NM_SetCoordinateOrigin (unsigned int px,unsigned int py);
extern "C" __declspec(dllexport) int _stdcall NM_SetDirection (char direct);
extern "C" __declspec(dllexport) int _stdcall NM_SetLabelHeight (unsigned int lheight,unsigned int gapH);
extern "C" __declspec(dllexport) int _stdcall NM_SetLabelWidth (unsigned int lwidth);
extern "C" __declspec(dllexport) int _stdcall NM_SetDarkness (unsigned int dk);
extern "C" __declspec(dllexport) int _stdcall NM_SetPrintSpeed (unsigned int px);
extern "C" __declspec(dllexport) int _stdcall NM_DrawText (	unsigned int px,
															unsigned int py,
															unsigned int pdirec,
															unsigned int pFont,
															unsigned int pHorizontal,
															unsigned int pVertical,
															char ptext,
															LPTSTR pstr
															);
extern "C" __declspec(dllexport) int _stdcall NM_DrawTextTrueTypeW(	int x,
															int y,
															int FHeight,
															int FWidth,
															LPCTSTR FType,
															int Fspin,
															int FWeight,
															BOOL FItalic,
															BOOL FUnline,
															BOOL FStrikeOut,
															LPCTSTR id_name,
															LPCTSTR data
															);
extern "C" __declspec(dllexport) int _stdcall NM_DrawBarcode (unsigned int px,
																unsigned int py,
																unsigned int pdirec,
																LPTSTR pCode,
																unsigned int NarrowWidth,
																unsigned int pHorizontal,
																unsigned int pVertical,
																char ptext,
																LPTSTR pstr
																);
extern "C" __declspec(dllexport) int _stdcall NM_DrawBar2D_DATAMATRIX(unsigned int x,
																		unsigned int y,
																		unsigned int w,
																		unsigned int v, unsigned int o,
																		unsigned int m,
																		LPTSTR pstr
																		);
extern "C" __declspec(dllexport) int _stdcall NM_DrawBar2D_QR(unsigned int x,
																unsigned int y,
																unsigned int w,
																unsigned int v,
																unsigned int o,
																unsigned int r,
																unsigned int m,
																unsigned int g,
																unsigned int s,
																LPTSTR pstr
																);
extern "C" __declspec(dllexport) int _stdcall NM_DrawLineXor (unsigned int px,
																unsigned int py,
																unsigned int pbyte,
																unsigned int pH
																);
extern "C" __declspec(dllexport) int _stdcall NM_DrawLineOr (unsigned int px,
																unsigned int py,
																unsigned int pbyte,
																unsigned int pH
																);
extern "C" __declspec(dllexport) int _stdcall NM_DrawWhiteLine (unsigned int px,
																unsigned int py,
																unsigned int pbyte,
																unsigned int pH
																);
extern "C" __declspec(dllexport) int _stdcall NM_DrawDiagonal (unsigned int px,
																unsigned int py,
																unsigned int thickness,
																unsigned int pEx,
																unsigned int pEy
																);
extern "C" __declspec(dllexport) int _stdcall NM_DrawRectangle (unsigned int px,
																unsigned int py,
																unsigned int thickness,
																unsigned int pEx,
																unsigned int pEy
																);
//UHF RFID
extern "C" __declspec(dllexport) int _stdcall NM_RW_RfidFormat(int RWMode,
																int Format,
																int StartBlock,
																int DataNum,
																int Area,
																LPTSTR pstr
																);
extern "C" __declspec(dllexport) int _stdcall NM_SetRFIDReadWritePower(int ReadPower, int WritePower);
extern "C" __declspec(dllexport) int _stdcall NM_ReadRFTagDataUSB(unsigned int usbPort,
																	unsigned int DataBlock,
																	unsigned int RFPower,
																	int Feed,
																	LPTSTR pRFData,
																	int TimeDelay_ms
																	);
extern "C" __declspec(dllexport) int _stdcall NM_SetRFTagPassWLock(int Mode,
																	int Area,
																	LPTSTR pstr
																	);
extern "C" __declspec(dllexport) int _stdcall NM_SetRFTagRetryCount(int RetryCount);
extern "C" __declspec(dllexport) int _stdcall NM_SetRFIDPosition(int ReservPara1,
																	int ReadWritePosition,
																	int PositionError,
																	int MaxReErrorNum,
																	int ReservPara2
																	);
extern "C" __declspec(dllexport) int _stdcall NM_AutoRFTagDetc();
extern "C" __declspec(dllexport) int _stdcall NM_RI_ReadTidOnly(int Area,
																	int Port,
																	int Enable,
																	int DataNum
																	);
extern "C" __declspec(dllexport) int _stdcall NM_GetUHFRfidTID_Usb(int Port,
																	LPTSTR GetData,
																	int timeout_ms
																	);
extern "C" __declspec(dllexport) int _stdcall NM_GetUHFRfidTID_UsbEx(int Port,
																		LPTSTR GetData,
																		int timeout_ms
																		);
extern "C" __declspec(dllexport) int _stdcall NM_PrintLabel (unsigned int number,unsigned int cpnumber);

extern "C" __declspec(dllexport) int _stdcall NM_GetUsbPara (unsigned char* pData);

extern "C" __declspec(dllexport) int _stdcall NM_SoftFontList (void);

extern "C" __declspec(dllexport) int _stdcall NM_SendCommand (char* pCmd);

extern "C" __declspec(dllexport) int _stdcall NM_PrintBitmap (int pageWidth,int pageHeight,int xOffset,int yOffset,char* pFileName);
extern "C" __declspec(dllexport) int _stdcall NM_PrintBitmapEx (int pageWidth,int pageHeight,int xOffset,int yOffset,char* pFileName);

extern "C" __declspec(dllexport) int _stdcall NM_PrintGraph (char* pFileName);
extern "C" __declspec(dllexport) int _stdcall NM_PrintGraphEx (char* pFileName);

#endif