#ifndef HANS_ADVBASEDLL_926M01B4_82E7_4218J3_B7091_423OPZSCVB
#define HANS_ADVBASEDLL_926M01B4_82E7_4218J3_B7091_423OPZSCVB

//导入导出定义
#ifndef  HANSADVBASE_EXPORT
	#define  HANSADVBASE_API	__declspec(dllimport)
#else
	#define  HANSADVBASE_API	__declspec(dllexport)
#endif

#define HL_ERR_SUCCESS		0 			//成功
#define HL_ERR_PROGRUN		1 			//另一个程序在运行
#define HL_ERR_PATH			2			//路径不正确,可能程序不在软件安装目录下运行
#define HL_ERR_FAILOPEN		3 			//初始化失败，请检查狗和卡的连接情况
#define HL_ERR_NOINITIAL	4 			//未初始化
#define HL_ERR_WARNING		5 			//报警
#define HL_ERR_OVERTIME		6 			//命令超时
#define HL_ERR_READFILE		7 			//无法读取文件
#define HL_ERR_NOFINDFONT	8 			//指定的字体不存在
#define HL_ERR_NOPEN		9 			//指定的层号不存在
#define HL_ERR_NOOBJECT		10 			//没找到指定的对象
#define HL_ERR_PARAM		11 			//参数非法
#define HL_ERR_STATUS		12 			//错误的状态,当前状态下不能执行此操作
#define HL_ERR_ALLOCMEMORY	13 			//分配内存失败
#define HL_ERR_OVERRANGE	14 			//打标范围超限
#define HL_ERR_BUFFERSIZE	15			//缓冲区不够
#define HL_ERR_NULLPTR		16			//空指针
#define HL_ERR_NODOC		17			//未找到指定文档
#define HL_ERR_REOPEN		18			//指定文档已经被打开
#define HL_ERR_EXECFAIL     19          //下位机命令执行失败
#define HL_ERR_DOWNFAIL		20			//多文档数据下载失败
#define HL_ERR_MULDOWNIO	21			//不能存相同的文档IO托管值
#define HL_ERR_ALREADYDOWN  22			//数据已下载
#define HL_ERR_CALLFUN		23			//调用函数顺序不正确
#define HL_ERR_PREPROCESS   24			//生成线条失败
#define HL_ERR_NOCALIFILE   25			//找不到校正文件，请先启动cali.exe进行校正
#define HL_ERR_PROSTOP	    26          //旋转切分停止
#define HL_ERR_OUTRANGE     27          //超出打标范围
#define HL_ERR_NORIGHT	    28			//没有二次开发库权限
#define HL_ERR_DOGOVERTIME	29			//授时狗已经过期
#define HL_ERR_DEMON_VER	30			//没有控制卡，演示模式


#define HL_ERR_UNKNOWN		100			//未知错误

#define  WM_TOUCH_MSG		(WM_USER+1095)  //主动检测脚踏触发消息

#define DFT_DOC_NAME		_T("default")
///////////////////文档数据下载过程消息响应////////////////////
#define WM_MARK_END			( WM_USER+5 )
#define MARK_TEND			100
#define MARK_INFO			103

//对外接口点
typedef struct tgDot
{
	double x;
	double y;
	double z;
}InterExDot;

typedef struct tgStroke
{
	UINT nCount;
	int   nLayer;
	InterExDot * pDot;
}InterExStroke;

typedef void (*HS_MARKMSG_CALLBACK)(UINT uCard,int nID, UINT64 nMarkTime);

HANSADVBASE_API int GetDllVersion(WORD* pMainVer,WORD *pDllVer);
HANSADVBASE_API int InitialMachineA(char *szPath);
HANSADVBASE_API int InitialMachineW(wchar_t *szPath);
HANSADVBASE_API int InitialMachineAForVIP(char *szPath);
HANSADVBASE_API int InitialMachineWForVIP(wchar_t *szPath);
HANSADVBASE_API int CloseMachine();

HANSADVBASE_API int GetMarkRange(UINT uCard,double *pX,double *pY);
HANSADVBASE_API int LoadMarkFileA(UINT uCard,char *szFile);
HANSADVBASE_API int LoadMarkFileW(UINT uCard,wchar_t *szFile);
HANSADVBASE_API int GetDocListA(UINT uCard,char szDocList[][20], int* pCount);
HANSADVBASE_API int GetDocListW(UINT uCard,wchar_t szDocList[][20], int* pCount);
HANSADVBASE_API int SetCurDocA(UINT uCard,char *szDocName);
HANSADVBASE_API int SetCurDocW(UINT uCard,wchar_t *szDocName);
HANSADVBASE_API int SaveMarkFileA(UINT uCard,char *szFile);
HANSADVBASE_API int SaveMarkFileW(UINT uCard,wchar_t *szFile);
HANSADVBASE_API int CloseMarkFileA(UINT uCard,char *szFile,BOOL bSave);
HANSADVBASE_API int CloseMarkFileW(UINT uCard,wchar_t *szFile,BOOL bSave);

HANSADVBASE_API int IsTouch(UINT uCard,int* pTouchFlag);	
HANSADVBASE_API int CheckTouch(UINT uCard,HWND hWnd, BOOL bActive);
HANSADVBASE_API int Mark(UINT uCard,int nType, BOOL bWaitTouch, BOOL bWaitEnd, int nOverTime, BOOL bMarkAll);
HANSADVBASE_API int IsMarkEnd(UINT uCard,int* pFlag);
HANSADVBASE_API int MarkPause(UINT uCard);
HANSADVBASE_API int Remark(UINT uCard);
HANSADVBASE_API int MarkStop(UINT uCard);
HANSADVBASE_API int GetMarkTime(UINT uCard,UINT *pMarkTime);

HANSADVBASE_API int ChangeTextByNameA(UINT uCard,char *szName, char *szTextValue);
HANSADVBASE_API int ChangeTextByNameU(UINT uCard,wchar_t *szName, wchar_t *szTextValue);
HANSADVBASE_API int ChangeTextByNameW(UINT uCard,char *szName, wchar_t *szTextValue);
HANSADVBASE_API int ChangeTextByName2A(UINT uCard,char *szName, char *szTextValue, int nFlag);
HANSADVBASE_API int ChangeTextByName2U(UINT uCard,wchar_t *szName, wchar_t *szTextValue, int nFlag);
HANSADVBASE_API int GetTextByNameA(UINT uCard,char *szName, char *szText, int *pMaxCount);
HANSADVBASE_API int GetTextByNameU(UINT uCard,wchar_t *szName, wchar_t *szText, int *pMaxCount);
HANSADVBASE_API int GetTextByNameW(UINT uCard,char *szName, wchar_t *szText, int *pMaxCount);

HANSADVBASE_API int ReadPort(UINT uCard,DWORD* pValue);
HANSADVBASE_API int ReadOutPort(UINT uCard,DWORD* pValue);
HANSADVBASE_API int WritePort(UINT uCard,DWORD dwValue, DWORD dwMask);

HANSADVBASE_API int SetDevCfg(UINT uCard);
HANSADVBASE_API int SetDevCfgEx(UINT uCard);
HANSADVBASE_API int PreviewGraph(UINT uCard,HWND hWnd,double dbCenterX,double dbCenterY,double dbScale);
HANSADVBASE_API int SetHatchPara(UINT uCard,LPVOID lpPara);
HANSADVBASE_API int GetHatchPara(UINT uCard,LPVOID  lpPara);
HANSADVBASE_API int SetFontPara(UINT uCard,const LPVOID lpPara);
HANSADVBASE_API int GetFontPara(UINT uCard,LPVOID lpPara);
HANSADVBASE_API int SetLayerPara(UINT uCard,int nLayer, LPVOID lpPara);
HANSADVBASE_API int GetLayerPara(UINT uCard,int nLayer, LPVOID lpPara);

HANSADVBASE_API int GroupObjA(UINT uCard,char *szObjName);
HANSADVBASE_API int GroupObjW(UINT uCard,wchar_t *szObjName);
HANSADVBASE_API int UnGroupObj(UINT uCard);

HANSADVBASE_API int UnionGroupObjA(UINT uCard,char *szObjName);
HANSADVBASE_API int UnionGroupObjW(UINT uCard,wchar_t *szObjName);
HANSADVBASE_API int UnUnionGroupObj(UINT uCard);

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 以下几个为华为订制接口
HANSADVBASE_API int GetLayerByObjNameA(UINT uCard,char *szObjName,int *nLayer);
HANSADVBASE_API int GetLayerByObjNameW(UINT uCard,wchar_t *szObjName,int *nLayer);
HANSADVBASE_API int SetLayerByObjNameA(UINT uCard,char *szObjName,int nLayer);
HANSADVBASE_API int SetLayerByObjNameW(UINT uCard,wchar_t *szObjName,int nLayer);
HANSADVBASE_API int GetLayerByObjNameA2(UINT uCard,char *szObjName,int *nLayer,int *nFillLayer);
HANSADVBASE_API int GetLayerByObjNameW2(UINT uCard,wchar_t *szObjName,int *nLayer,int *nFIllLayer);
HANSADVBASE_API int SetLayerByObjNameA2(UINT uCard,char *szObjName,int nLayer,int nFillLayer);
HANSADVBASE_API int SetLayerByObjNameW2(UINT uCard,wchar_t *szObjName,int nLayer,int nFillLayer);

HANSADVBASE_API int GetFillParaByObjNameA(UINT uCard,char *szObjName,LPVOID lpPara);
HANSADVBASE_API int GetFillParaByObjNameW(UINT uCard,wchar_t *szObjName,LPVOID lpPara);
HANSADVBASE_API int SetFillParaByObjNameA(UINT uCard,char *szObjName,LPVOID lpPara);
HANSADVBASE_API int SetFillParaByObjNameW(UINT uCard,wchar_t *szObjName,LPVOID lpPara);
HANSADVBASE_API int GetFontFaceByObjNameA(UINT uCard,char *szObjName,char* szFontName);
HANSADVBASE_API int GetFontFaceByObjNameW(UINT uCard,wchar_t *szObjName,wchar_t* szFontName);
HANSADVBASE_API int SetFontFaceByObjNameA(UINT uCard,char *szObjName,char* szFontName);
HANSADVBASE_API int SetFontFaceByObjNameW(UINT uCard,wchar_t *szObjName,wchar_t* szFontName);

HANSADVBASE_API int GetObjPropertyByNameA(UINT uCard,char* szObjName,double* pLeft,double *pTop,double *pRight,double *pBottom);
HANSADVBASE_API int GetObjPropertyByNameW(UINT uCard,wchar_t* szObjName,double* pLeft,double *pTop,double *pRight,double *pBottom);
HANSADVBASE_API int SetObjPropertyByNameW(UINT uCard,wchar_t* szObjName,double dbLeft,double dbTop,double dbRight,double dbBottom);
HANSADVBASE_API int SetObjPropertyByNameA(UINT uCard,char* szObjName,double dbLeft,double dbTop,double dbRight,double dbBottom);

HANSADVBASE_API int PickObjectByPointW(UINT uCard,double x,double y,double bShift,double dbCenterX,double dbCenterY,double dbScale);
HANSADVBASE_API int PickObjectByPointA(UINT uCard,double x,double y,double bShift,double dbCenterX,double dbCenterY,double dbScale);
HANSADVBASE_API int PickObjectByRect(UINT uCard,double left,double right,double top,double bottom,double bShift,double dbCenterX,double dbCenterY,double dbScale);
HANSADVBASE_API int LogicToPhysic(UINT uCard,double *pX,double *pY,double dbCenterX,double dbCenterY,double dbScale);

HANSADVBASE_API int GetFontParaByObjNameW(UINT uCard,wchar_t *szObjName,LPVOID lpPara);
HANSADVBASE_API int GetFontParaByObjNameA(UINT uCard,char *szObjName,LPVOID lpPara);
HANSADVBASE_API int SetFontParaByObjNameW(UINT uCard,wchar_t *szObjName,const LPVOID lpPara);
HANSADVBASE_API int SetFontParaByObjNameA(UINT uCard,char *szObjName,const LPVOID lpPara);

HANSADVBASE_API int GetSuperParaByNameW(UINT uCard,wchar_t *szObjName,LPVOID lpPara);
HANSADVBASE_API int GetSuperParaByNameA(UINT uCard,char *szObjName,LPVOID lpPara);
HANSADVBASE_API int SetSuperParaByNameW(UINT uCard,wchar_t *szObjName,const LPVOID lpPara);
HANSADVBASE_API int SetSuperParaByNameA(UINT uCard,char *szObjName,const LPVOID lpPara);
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

HANSADVBASE_API int ImportVectorFileA(UINT uCard,char *szFileName, double dbPosX, double dbPosY, 
											  double dbWidth, double dbHeight, double dbRotate,
											  BOOL bHath, int nHatchLayer, char *szObjName);
HANSADVBASE_API int ImportVectorFileW(UINT uCard,wchar_t *szFileName, double dbPosX, double dbPosY, 
												  double dbWidth, double dbHeight, double dbRotate,
												  BOOL bHath, int nHatchLayer, wchar_t *szObjName);
HANSADVBASE_API int ImportVectorFileA2(UINT uCard,char *szFileName, double dbPosX, double dbPosY, 
										double dbWidth, double dbHeight, double dbRotate,
										BOOL bHatch, int nLayer, char *szObjName,int nFillLayer);
HANSADVBASE_API int ImportVectorFileW2(UINT uCard,wchar_t *szFileName, double dbPosX, double dbPosY, 
										double dbWidth, double dbHeight, double dbRotate,
										BOOL bHatch, int nLayer, wchar_t *szObjName,int nFillLayer);

HANSADVBASE_API int ImportImageFileA(UINT uCard,char *szFileName, double dbPosX, double dbPosY, 
											  double dbWidth, double dbHeight, double dbRotate,
											  int nMarkType, double dbDotDistX, double dbDotDistY,
											  int nAccDot, BOOL bReciprocate, int nRepairDot, char *szObjName);
HANSADVBASE_API int ImportImageFileW(UINT uCard,wchar_t *szFileName, double dbPosX, double dbPosY, 
												 double dbWidth, double dbHeight, double dbRotate,
												 int nMarkType, double dbDotDistX, double dbDotDistY,
												 int nAccDot, BOOL bReciprocate, int nRepairDot, wchar_t *szObjName);
HANSADVBASE_API int ImportImageFileA2(UINT uCard,char *szFileName, double dbPosX, double dbPosY, 
									   double dbWidth, double dbHeight, double dbRotate,
									   int nMarkType, double dbDotDistX, double dbDotDistY,
									   int nAccDot, BOOL bReciprocate, int nRepairDot, char *szObjName,int nLayer);
HANSADVBASE_API int ImportImageFileW2(UINT uCard,wchar_t *szFileName, double dbPosX, double dbPosY, 
									   double dbWidth, double dbHeight, double dbRotate,
									   int nMarkType, double dbDotDistX, double dbDotDistY,
									   int nAccDot, BOOL bReciprocate, int nRepairDot, wchar_t *szObjName,int nLayer);

HANSADVBASE_API int AddTextA(UINT uCard,	char *szStr, 
											double dbHeight, 
											double dbWidthRatio,
											BOOL bModel,
											char *szTextName,
											double dbPosX, 
											double dbPosY, 
											int nAlign, 
											double dbAngle,
											int nLayer, 
											BOOL bHatch, 
											int nHatchLayer,
											char *szObjName
										);
HANSADVBASE_API int AddTextW(UINT uCard,	wchar_t *szStr, 
										 double dbHeight,
										 double dbWidthRatio,
										 BOOL bModel,
										 wchar_t *szTextName,
										 double dbPosX,
										 double dbPosY,
										 int nAlign,
										 double dbAngle,
										 int nLayer,
										 BOOL bHatch,
										 int nHatchLayer,
										 wchar_t *szObjName
										 );

HANSADVBASE_API int AddText2A(UINT uCard,	char *szStr, 
										 double dbHeight, 
										 double dbWidthRatio,
										 BOOL bModel,
										 char *szTextName,
										 double dbPosX, 
										 double dbPosY, 
										 int nAlign, 
										 double dbAngle,
										 int nLayer, 
										 BOOL bHatch, 
										 int nHatchLayer,
										 double dbCharSpace,
										 double dbLineSpace,
										 char *szObjName
										 );
HANSADVBASE_API int AddText2W(UINT uCard,	wchar_t *szStr, 
										  double dbHeight, 
										  double dbWidthRatio,
										  BOOL bModel,
										  wchar_t *szTextName,
										  double dbPosX, 
										  double dbPosY, 
										  int nAlign, 
										  double dbAngle,
										  int nLayer, 
										  BOOL bHatch, 
										  int nHatchLayer,
										  double dbCharSpace,
										  double dbLineSpace,
										  wchar_t *szObjName
										  );

HANSADVBASE_API int AddText3A(UINT uCard,char *szStr, 
							  double dbHeight, 
							  double dbWidthRatio,
							  BOOL bModel,
							  char *szTextName,
							  double dbPosX, 
							  double dbPosY, 
							  int nAlign, 
							  double dbAngle,
							  int nLayer, 
							  BOOL bHatch, 
							  int nHatchLayer,
							  double dbCharSpace,
							  double dbLineSpace,
							  char *szObjName,
							  BOOL bFixSpace,
							  double dbFixSpace
							  );

HANSADVBASE_API int AddText3W(UINT uCard,wchar_t *szStr, 
							  double dbHeight, 
							  double dbWidthRatio,
							  BOOL bModel,
							  wchar_t *szTextName,
							  double dbPosX, 
							  double dbPosY, 
							  int nAlign, 
							  double dbAngle,
							  int nLayer, 
							  BOOL bHatch, 
							  int nHatchLayer,
							  double dbCharSpace,
							  double dbLineSpace,
							  wchar_t *szObjName,
							  BOOL bFixSpace,
							  double dbFixSpace
							  );

HANSADVBASE_API int AddBarcodeA(UINT uCard,	char *szStr, 
											int		nBarType, 
											double	dbHeight, 
											double	dbPosX, 
											double	dbPosY,
											double	dbAngle, 
											int		nAlign, 
											int		nLayerNo, 
											double	dbBarRatio, 
											double	dbLineDist,
											double	dbShrink, 
											BOOL	bReverse, 
											double	dbRevWidth, 
											double	dbRevHeight, 
											BOOL	Model, 
											char *szTextName, 
											char *szObjName
											);
HANSADVBASE_API int AddBarcodeAEx(UINT uCard,	char *szStr, 
								  int		nBarType, 
								  double	dbHeight, 
								  double	dbPosX, 
								  double	dbPosY,
								  double	dbAngle, 
								  int		nAlign, 
								  int		nLayerNo, 
								  double	dbBarRatio, 
								  double	dbLineDist,
								  double	dbShrink, 
								  BOOL	bReverse, 
								  double	dbRevWidth, 
								  double	dbRevHeight, 
								  BOOL	Model, 
								  char *szTextName, 
								  char *szObjName,
								  BOOL bMatrix,
								  BOOL bMatrixType,
								  double	dbDotRadius,
								  BOOL bScale,
								  double dbPrecision,
								  int nSampleCount
								  );
HANSADVBASE_API int AddBarcodeW(UINT uCard,	wchar_t *szStr, 
											int		nBarType, 
											double	dbHeight, 
											double	dbPosX, 
											double	dbPosY,
											double	dbAngle, 
											int		nAlign, 
											int		nLayerNo, 
											double	dbBarRatio, 
											double	dbLineDist,
											double	dbShrink, 
											BOOL	bReverse, 
											double	dbRevWidth, 
											double	dbRevHeight, 
											BOOL	Model, 
											wchar_t *szTextName, 
											wchar_t *szObjName
											);
HANSADVBASE_API int AddBarcodeWEx(UINT uCard,	wchar_t *szStr, 
								  int		nBarType, 
								  double	dbHeight, 
								  double	dbPosX, 
								  double	dbPosY,
								  double	dbAngle, 
								  int		nAlign, 
								  int		nLayerNo, 
								  double	dbBarRatio, 
								  double	dbLineDist,
								  double	dbShrink, 
								  BOOL	bReverse, 
								  double	dbRevWidth, 
								  double	dbRevHeight, 
								  BOOL	Model, 
								  wchar_t *szTextName, 
								  wchar_t *szObjName,
								  BOOL bMatrix,
								  BOOL bMatrixType,
								  double	dbDotRadius,
								  BOOL bScale,
								  double dbPrecision,
								  int nSampleCount
								  );

HANSADVBASE_API int AddCurveA(UINT uCard,double ptBuf[][2], int nPtNum, int nLayer, BOOL bHatch, int nHatchLayer, char *szObjName);
HANSADVBASE_API int AddCurveW(UINT uCard,double ptBuf[][2], int nPtNum, int nLayer, BOOL bHatch, int nHatchLayer, wchar_t *szObjName);

HANSADVBASE_API int AddDotMatrixA(UINT uCard,double ptBuf[][2], int nPtNum, int nLayer, char *szObjName);
HANSADVBASE_API int AddDotMatrixW(UINT uCard,double ptBuf[][2], int nPtNum, int nLayer, wchar_t *szObjName);

HANSADVBASE_API int AddDelayA(UINT uCard,DWORD dwDelay, char *szObjName);
HANSADVBASE_API int AddDelayW(UINT uCard,DWORD dwDelay, wchar_t *szObjName);

HANSADVBASE_API int AddInputA(UINT uCard,DWORD  dwInput, DWORD  dwInputMask, char *szObjName);
HANSADVBASE_API int AddInputW(UINT uCard,DWORD  dwInput, DWORD  dwInputMask, wchar_t *szObjName);

HANSADVBASE_API int AddOutputA(UINT uCard,DWORD  dwOutput, DWORD  dwOutputMask,DWORD dwOutputDelay, char *szObjName);
HANSADVBASE_API int AddOutputW(UINT uCard,DWORD  dwOutput, DWORD  dwOutputMask,DWORD dwOutputDelay, wchar_t *szObjName);

HANSADVBASE_API int AddMotorPosA(UINT uCard,double* motorAxisPos,char *szObjName);
HANSADVBASE_API int AddMotorPosW(UINT uCard,double* motorAxisPos,wchar_t *szObjName);
HANSADVBASE_API int AddMotorMoveA(UINT uCard,int nWorkType,WORD nAxis,WORD nMoveMode,double dbMoveValue,char *szObjName);
HANSADVBASE_API int AddMotorMoveW(UINT uCard,int nWorkType,WORD nAxis,WORD nMoveMode,double dbMoveValue,wchar_t *szObjName);

HANSADVBASE_API int AddConditionStartA(UINT uCard,DWORD  dwInput, DWORD  dwInputMask,char* szObjName);
HANSADVBASE_API int AddConditionStartW(UINT uCard,DWORD  dwInput, DWORD  dwInputMask,wchar_t* szObjName);
HANSADVBASE_API int AddConditionEndA(UINT uCard,char* szObjName);
HANSADVBASE_API int AddConditionEndW(UINT uCard,wchar_t* szObjName);
HANSADVBASE_API int AddBufferLaserA(UINT uCard,BOOL bLaserOn, double dbQFreq, double dbQRls, double dbCurrent, double dbPower, int nLaserMode,char* szObjName);
HANSADVBASE_API int AddBufferLaserW(UINT uCard,BOOL bLaserOn, double dbQFreq, double dbQRls, double dbCurrent, double dbPower, int nLaserMode,wchar_t* szObjName);
HANSADVBASE_API int AddCCDA(UINT uCard,UINT nProgID,UINT nNGRepNum,UINT nOverTime,UINT nErrorMode,UINT	nBaudRate,BOOL bScanJump,double dbX,double dbY,UINT nDelay,char* szObjName);
HANSADVBASE_API int AddCCDW(UINT uCard,UINT nProgID,UINT nNGRepNum,UINT nOverTime,UINT nErrorMode,UINT	nBaudRate,BOOL bScanJump,double dbX,double dbY,UINT nDelay,wchar_t* szObjName);
HANSADVBASE_API int AddPosCaliA(UINT uCard,UINT nCaliType, char *szObjName);
HANSADVBASE_API int AddPosCaliW(UINT uCard,UINT nCaliType, wchar_t *szObjName);

HANSADVBASE_API int GetObjListA(UINT uCard,char szObjList[][20], int *pCount);
HANSADVBASE_API int GetObjListW(UINT uCard,wchar_t szObjList[][20], int *pCount);
HANSADVBASE_API int SelectObjectsA(UINT uCard,char *szObjName, BOOL bSelected);
HANSADVBASE_API int SelectObjectsW(UINT uCard,wchar_t *szObjName, BOOL bSelected);
HANSADVBASE_API int ClearObjects(UINT uCard);

HANSADVBASE_API int Move(UINT uCard,double mx,double my);
HANSADVBASE_API int Rotate(UINT uCard,double x, double y,double a);
HANSADVBASE_API int Shear(UINT uCard,double x, double y, double ax, double ay);
HANSADVBASE_API int Scale(UINT uCard,double x, double y,double rx,double ry);
HANSADVBASE_API int Array(UINT uCard,double ptArray[][2],int nSize);

HANSADVBASE_API int GetObjProperty(UINT uCard,double* pLeft,double *pTop,double *pRight,double *pBottom);

HANSADVBASE_API int IGotoXYZ(UINT uCard,int nType, double dbX, double dbY, double dbZ);
HANSADVBASE_API int IGotoXYZ2(UINT uCard,int nType, double dbX, double dbY, double dbZ, BOOL bRed);
HANSADVBASE_API int SetCurrent(UINT uCard,double dbCurrent);
HANSADVBASE_API int ILaserOn(UINT uCard,double dbQFrq, double QRls,double dbCurrentA,double dbPower);
HANSADVBASE_API int ILaserOn2(UINT uCard,double dbQFrq,double dbQRls,double dbCurrentA,double dbPower,int nLaserMode);
HANSADVBASE_API int ILaserOff(UINT uCard);
HANSADVBASE_API int ISetRedLight(UINT uCard, BOOL bOpen);
HANSADVBASE_API int GetRedLight(UINT uCard, BOOL* bOpen);

HANSADVBASE_API void GetLastErrorA(UINT uCard,int* pError, char* szMsg, int nSize);
HANSADVBASE_API void GetLastErrorW(UINT uCard,int* pError, wchar_t* szMsg, int nSize);

HANSADVBASE_API int CheckDogFuncFlag(BYTE nBit, BOOL* bOpen);

HANSADVBASE_API int MoveMotor(UINT uCard,LPVOID pPara);
HANSADVBASE_API int HomeMove(UINT uCard,LPVOID pPara,BOOL bSoftHome);
HANSADVBASE_API int MoveMotorV(UINT uCard,int nAxisNo, double dbMoveValue, int nMoveModel, int nMoveType);
HANSADVBASE_API int HomeMoveV(UINT uCard,int nAxisNo, BOOL bSoftHome);
HANSADVBASE_API int GetCurMotorPos(UINT uCard,int nAxis, double& dbPos);
HANSADVBASE_API int GetCurSoftMotorPos(UINT uCard,int nAxis, double& dbPos);
HANSADVBASE_API int SetAsSoftHome(UINT uCard,int nAxis);

HANSADVBASE_API int GetUnUseLayNO(UINT uCard,int* pLayer,int* pFillLayer);

// 运动参数设置
HANSADVBASE_API int SetMotionPara(UINT uCard,int nAxis, double dbEmptySpeed, double dbWorkSpeed, double dbHomeHighSpeed, double dbHomeLowSpeed, double dbEmptyTAcc, double dbWorkTAcc, double dbHomeTAcc);
HANSADVBASE_API int SetMotionSysPara(UINT uCard,int nAxis,int nPPR, double dbPitch, int nDelay,int nAxisType,int nMotorDire,double	dbEmptySpeed,double dbWorkSpeed,double dbEmptyTAcc,double dbWorkTAcc,BOOL bHardOrgEnable, BOOL bAutoHome, BOOL bEnabled);
HANSADVBASE_API int SetMotionSysPara2(UINT uCard,int nAxis,LPVOID pPara);
HANSADVBASE_API int SetRotateMarkPara(UINT uCard,double dbDiameter,double dbDivAngle,int nFillNum,BOOL bSaveCfg);
HANSADVBASE_API int RotateMark(UINT uCard,int nType, BOOL bWaitTouch, BOOL bWaitEnd, int nOverTime);
HANSADVBASE_API int PreprocessRotateData(UINT uCard,int nProcessType);
HANSADVBASE_API int GetLayerColor(UINT uCard, int nLayerNo, LPCOLORREF pColor );

HANSADVBASE_API int GetStrokeListA(UINT uCard,char *szObjName, LPVOID pData);
HANSADVBASE_API int GetStrokeListW(UINT uCard,wchar_t *szObjName, LPVOID pData);
HANSADVBASE_API int GetStrokeList2A(UINT uCard,char *szObjName, double*& dbX, double*& dbY, double*& dbZ, int*& nLayer, int*& nCountSub, int* nCount, int nType);
HANSADVBASE_API int GetStrokeList2W(UINT uCard,wchar_t *szObjName, double*& dbX, double*& dbY, double*& dbZ, int*& nLayer, int*& nCountSub, int* nCount, int nType);
HANSADVBASE_API int FreeStrokeList2(UINT uCard,double*& dbX, double*& dbY, double*& dbZ, int*& nLayer, int*& nCountSub);
HANSADVBASE_API int PreprocessMark(UINT uCard);
HANSADVBASE_API int FreeStrokeList(UINT uCard,LPVOID pData);
HANSADVBASE_API int MarkStorkeList(UINT uCard,int nType,const LPVOID pData);
HANSADVBASE_API int MarkStorke(UINT uCard,int nType,LPVOID pData,int nNum);
HANSADVBASE_API int MarkLine(UINT uCard, double x1, double y1, double x2, double y2, int nLayer, int nType);
HANSADVBASE_API int SendCustomCmd(UINT uCard,__int64 inCmd,__int64 outCmd);

typedef void (* HS_USERDEFINE_MSG_CALLBACK)(UINT uCard,DWORD dwCode,__int64 value);
HANSADVBASE_API int SetCustomMsgCall(UINT uCard,HS_USERDEFINE_MSG_CALLBACK pCallBack);

HANSADVBASE_API int GetTextExtInfoW(UINT uCard,wchar_t *szObjName, LPVOID lpTextExtInfo);

HANSADVBASE_API int GetDocObjectListW(UINT uCard,LPVOID lpPara);
//
HANSADVBASE_API int GetVarTextListA(UINT uCard,char *szObjList, int *pCount);
HANSADVBASE_API int GetVarTextListW(UINT uCard,wchar_t *szObjList, int *pCount);

HANSADVBASE_API int GetVarTextNumByObjNameW(UINT uCard,wchar_t *szObjName, int *pCount);
HANSADVBASE_API int GetVarTextNumByObjNameA(UINT uCard,char *szObjName, int *pCount);
HANSADVBASE_API int GetVarTextListByObjNameW(UINT uCard,wchar_t *szObjName, wchar_t szObjList[][20], int *pCount);
HANSADVBASE_API int GetVarTextListByObjNameA(UINT uCard,char *szObjName, char szObjList[][20], int *pCount);



HANSADVBASE_API int SetTextExtInfoW(UINT uCard,wchar_t *szObjName, LPVOID lpTextExtInfo);

HANSADVBASE_API int GetDocExtInfoW(UINT uCard, LPVOID lpDocExtInfo);
HANSADVBASE_API int SetDocExtInfoW(UINT uCard, LPVOID lpDocExtInfo);

HANSADVBASE_API int GetCardNumber(DWORD* pNumber);
HANSADVBASE_API int GetLayerParaType(UINT uCard,int &nType);
// HANSADVBASE_API int SetCardIndex(DWORD nIndex);
// HANSADVBASE_API int EnumCardKeyA(char pCardID[][50],int& nNumber);
// HANSADVBASE_API int EnumCardKeyW(wchar_t pCardID[][50],int& nNumber);
HANSADVBASE_API int GetCardKeyA(UINT uCard,char* pDogStr, int &nBufSize);
HANSADVBASE_API int GetCardKeyW(UINT uCard,wchar_t* pDogStr, int &nBufSize);

HANSADVBASE_API int BeginMulDownload(UINT uCard,HWND hWnd);
HANSADVBASE_API int DownSingleDocA(UINT uCard, char *szFile, WORD uIO);
HANSADVBASE_API int DownSingleDocW(UINT uCard, wchar_t *szFile, WORD nSign);
HANSADVBASE_API int EndMulDownload(UINT uCard, UINT &nDownSuccess, HS_MARKMSG_CALLBACK pCallMarkMsg );
HANSADVBASE_API int SetCurrentDocOffline(UINT uCard,HWND hwnd);
HANSADVBASE_API int SetWorkStatus(UINT uCard,UINT nStatus, HS_MARKMSG_CALLBACK pCallMarkMsg);
HANSADVBASE_API int SetOnline(UINT uCard);
HANSADVBASE_API int ClearFlashData(UINT uCard);
HANSADVBASE_API int SoftReset(UINT uCard);
HANSADVBASE_API int SetGalvHomeSts(UINT uCard,BOOL bHome);
HANSADVBASE_API int ControlScannerSpeed(UINT uCard,DWORD nWaitTime, int nX, int nY, BOOL bLaserOn);
HANSADVBASE_API int GetDogInfoID(char sn[33], char compId[5] ,bool bDevIdFlag, char devId[9]);
HANSADVBASE_API int WriteOutPortBit(UINT uCard,int iBit,bool bState);

//飞行设置
HANSADVBASE_API int SetMarkModel(UINT uCard,int nMarkModel,int nFlyType,BOOL bDircet,double dRation,double dInterval,HS_MARKMSG_CALLBACK pCallMarkMsg);
HANSADVBASE_API int GetEncoderPos(UINT uCard,long * PosLast,BOOL bClear);
HANSADVBASE_API int MarkFlyIOStart(UINT uCard);

//矢量转位图
HANSADVBASE_API int Vector2BitmapA(UINT uCard
								   , double dbSpace
								   , double dbLineWidth
								   , double dbPageSpace
								   , BOOL bContour
								   , BOOL bFill
								   , BOOL bColDivEnable
								   , double dbRowSpace
								   , double dbColSpace
								   , double dbDotDistX
								   , double dbDotDistY
								   , int nType
								   , int nAccDot
								   , BOOL bReciprocate
								   , int nRepairDot
								   , TCHAR* szFolder
								   , BOOL bSelected = TRUE);
HANSADVBASE_API int Vector2BitmapW(UINT uCard
								   , double dbSpace
								   , double dbLineWidth
								   , double dbPageSpace
								   , BOOL bContour
								   , BOOL bFill
								   , BOOL bColDivEnable
								   , double dbRowSpace
								   , double dbColSpace
								   , double dbDotDistX
								   , double dbDotDistY
								   , int nType
								   , int nAccDot
								   , BOOL bReciprocate
								   , int nRepairDot
								   , TCHAR* szFolder
								   , BOOL bSelected = TRUE);

HANSADVBASE_API int SetTransformMarkParam(UINT uCard, double dbMoveX, double dbMoveY, double dbRotateX, double dbRotateY, double dbRotateAngle);
HANSADVBASE_API int SetTransformMarkParamEx(UINT uCard, double arrMoveX[], double arrMoveY[], double arrRotateX[], double arrRotateY[], double arrRotateAngle[], int nCount, BOOL bAutoClear = TRUE);
HANSADVBASE_API int SetTransformMarkParamEx2(UINT uCard, double arrMoveX[], double arrMoveY[], double arrRotateX[], double arrRotateY[], double arrRotateAngle[], int nCount, BOOL bAutoClear = TRUE);

HANSADVBASE_API int GetCardNameA(UINT uCard, char* szCardName, int* pBufferSize);
HANSADVBASE_API int GetCardNameW(UINT uCard, wchar_t* szCardName, int* pBufferSize);
HANSADVBASE_API int GetCardIDA(UINT uCard, char* szCardID, int* pBufferSize);
HANSADVBASE_API int GetCardIDW(UINT uCard, wchar_t* szCardID, int* pBufferSize);

HANSADVBASE_API HBITMAP PreviewGraphExA(UINT uCard, HWND hWnd, BOOL bAll, char* szObjName, int nWidth, int nHeigh);
HANSADVBASE_API HBITMAP PreviewGraphExW(UINT uCard, HWND hWnd, BOOL bAll, wchar_t* szObjName, int nWidth, int nHeigh);

HANSADVBASE_API int CopyA(UINT uCard, char* szObjName);
HANSADVBASE_API int CopyW(UINT uCard, wchar_t* szObjName);
HANSADVBASE_API int CutA(UINT uCard, char* szObjName);
HANSADVBASE_API int CutW(UINT uCard, wchar_t* szObjName);
HANSADVBASE_API int PasteA(UINT uCard, char* szObjName);
HANSADVBASE_API int PasteW(UINT uCard, wchar_t* szObjName);

HANSADVBASE_API int GetObjNameByNumberA(UINT uCard, int nIndex, char* szObjName, int* pBufferSize);
HANSADVBASE_API int GetObjNameByNumberW(UINT uCard, int nIndex, wchar_t* szObjName, int* pBufferSize);
HANSADVBASE_API int GetNumberByObjNameA(UINT uCard, int* nIndex, char* szObjName);
HANSADVBASE_API int GetNumberByObjNameW(UINT uCard, int* nIndex, wchar_t* szObjName);

HANSADVBASE_API int ChangeNameA(UINT uCard, char* szOldName, char* szNewName, int* pParam);
HANSADVBASE_API int ChangeNameW(UINT uCard, wchar_t* szOldName, wchar_t* szNewName, int* pParam);

HANSADVBASE_API int ChangeBitmapA(UINT uCard, char* szObjName, char *szPathName);
HANSADVBASE_API int ChangeBitmapW(UINT uCard, wchar_t* szObjName, wchar_t *szPathName);

HANSADVBASE_API int GetObjListSelectedA(UINT uCard,char szObjList[][20], int *pCount);
HANSADVBASE_API int GetObjListSelectedW(UINT uCard,wchar_t szObjList[][20], int *pCount);

HANSADVBASE_API int SetBitmapDropWhiteA(UINT uCard, char* szObjName, BOOL bDropWhite, BOOL bDropWhitePro, int nDropWhiteThreshold);
HANSADVBASE_API int SetBitmapDropWhiteW(UINT uCard, wchar_t* szObjName, BOOL bDropWhite, BOOL bDropWhitePro, int nDropWhiteThreshold);

HANSADVBASE_API int SetObjNameByNumberA(UINT uCard, int nIndex, char* szObjName);
HANSADVBASE_API int SetObjNameByNumberW(UINT uCard, int nIndex, wchar_t* szObjName);

HANSADVBASE_API int ImportBitmapDataA(UINT uCard
									  ,int* pData
									  ,int nRow
									  ,int nCol
									  ,double dbPosX
									  ,double dbPosY
									  ,double dbWidth
									  ,double dbHeight
									  ,double dbRotate
									  ,double dbDotDistX
									  ,double dbDotDistY
									  ,int nAccDot
									  ,BOOL bReciprocate
									  ,int nRepairDot
									  ,char *szObjName
									  ,int nLayer);

HANSADVBASE_API int ImportBitmapDataW(UINT uCard
									  ,int* pData
									  ,int nRow
									  ,int nCol
									  ,double dbPosX
									  ,double dbPosY
									  ,double dbWidth
									  ,double dbHeight
									  ,double dbRotate
									  ,double dbDotDistX
									  ,double dbDotDistY
									  ,int nAccDot
									  ,BOOL bReciprocate
									  ,int nRepairDot
									  ,wchar_t *szObjName
									  ,int nLayer);

HANSADVBASE_API int ChangeBitmapDataA(UINT uCard
									  ,char* szObjName
									  ,int* pData
									  ,int nRow
									  ,int nCol);

HANSADVBASE_API int ChangeBitmapDataW(UINT uCard
									  ,wchar_t* szObjName
									  ,int* pData
									  ,int nRow
									  ,int nCol);

HANSADVBASE_API int GetTextObjShapePropertyA(UINT uCard
											 ,char* szObjName
											 ,double* dbHeight
											 ,double* dbCharSpace
											 ,double* dbWidthRatio
											 ,double* dbLineSpace
											 ,BOOL* bFixSpace
											 ,double* dbFixSpace);

HANSADVBASE_API int GetTextObjShapePropertyW(UINT uCard
											 ,wchar_t* szObjName
											 ,double* dbHeight
											 ,double* dbCharSpace
											 ,double* dbWidthRatio
											 ,double* dbLineSpace
											 ,BOOL* bFixSpace
											 ,double* dbFixSpace);


HANSADVBASE_API int SetTextObjShapePropertyA(UINT uCard
											 ,char* szObjName
											 ,double dbHeight
											 ,double dbCharSpace
											 ,double dbWidthRatio
											 ,double dbLineSpace
											 ,BOOL bFixSpace
											 ,double dbFixSpace);

HANSADVBASE_API int SetTextObjShapePropertyW(UINT uCard
											 ,wchar_t* szObjName
											 ,double dbHeight
											 ,double dbCharSpace
											 ,double dbWidthRatio
											 ,double dbLineSpace
											 ,BOOL bFixSpace
											 ,double dbFixSpace);

HANSADVBASE_API int SplitByObjNameA(UINT uCard, char* szObjName, int nRow, int nCol, char szObjList[][20], int *pCount, BOOL bDelOriObj, double dbOverSplit);
HANSADVBASE_API int SplitByObjNameW(UINT uCard, wchar_t* szObjName, int nRow, int nCol, wchar_t szObjList[][20], int *pCount, BOOL bDelOriObj, double dbOverSplit);


// by 2024/06/28 多轴同时运动
HANSADVBASE_API int MoveMotorEx(UINT uCard,LPVOID pPara);
HANSADVBASE_API int MoveMotorVEx(UINT uCard,int nAxisNoEx, double dbMoveValue[8], int nMoveModel, int nMoveType);
HANSADVBASE_API int HomeMoveEx(UINT uCard,LPVOID pParaEx,BOOL bSoftHome);
HANSADVBASE_API int HomeMoveVEx(UINT uCard,int nAxisNoEx, BOOL bSoftHome);
HANSADVBASE_API int StopRunEx(UINT uCard,int nAxisNoEx);
// by 2024/07/19 坐标转DA
HANSADVBASE_API int GetDACoordinate(UINT uCard,double dbX,double dbY,long& nX,long& nY);

HANSADVBASE_API int SetMotorPos(UINT uCard, int nAxisNo, double dbPos);

HANSADVBASE_API int SwitchCaliBoxA(UINT uCard, char* szFilePath, BOOL bCover);
HANSADVBASE_API int SwitchCaliBoxW(UINT uCard, wchar_t* szFilePath, BOOL bCover);

HANSADVBASE_API int OrderObjects(UINT uCard, int nOldOrders[], int nCount, int nType);

HANSADVBASE_API int GetTextByOrderByObjNameA(UINT uCard, char *szObjName, int nOrder, int* pModel, char *szAlias, int* pBufferSize);
HANSADVBASE_API int GetTextByOrderByObjNameW(UINT uCard, wchar_t *szObjName, int nOrder, int* pModel, wchar_t *szAlias, int* pBufferSize);
HANSADVBASE_API int SetTextByOrderByObjNameA(UINT uCard, char *szObjName, int nOrder, int nModel, char *szAlias);
HANSADVBASE_API int SetTextByOrderByObjNameW(UINT uCard, wchar_t *szObjName, int nOrder, int nModel, wchar_t *szAlias);

HANSADVBASE_API int GetObjectTypeA(UINT uCard, char* szObjName, int* pObjType);
HANSADVBASE_API int GetObjectTypeW(UINT uCard, wchar_t* szObjName, int* pObjType);

HANSADVBASE_API int MirrorA(UINT uCard, int nMode, char* szObjName, int nType);
HANSADVBASE_API int MirrorW(UINT uCard, int nMode, wchar_t* szObjName, int nType);

HANSADVBASE_API int GetBarcodeTypeA(UINT uCard, char* szObjName, int* pBarCodeType);
HANSADVBASE_API int GetBarcodeTypeW(UINT uCard, wchar_t* szObjName, int* pBarCodeType);

HANSADVBASE_API int AddRectangleA(UINT uCard
								  , double dbXSize
								  , double dbYSize
								  , double dbXPos
								  , double dbYPos
								  , int nLayer
								  , BOOL bHatch
								  , int nHatchLayer
								  , char *szObjName);
HANSADVBASE_API int AddRectangleW(UINT uCard
								  , double dbXSize
								  , double dbYSize
								  , double dbXPos
								  , double dbYPos
								  , int nLayer
								  , BOOL bHatch
								  , int nHatchLayer
								  , wchar_t *szObjName);

HANSADVBASE_API int AddCircleA(UINT uCard
							   , double dbR
							   , double dbXPos
							   , double dbYPos
							   , int nLayer
							   , BOOL bHatch
							   , int nHatchLayer
							   , char *szObjName);
HANSADVBASE_API int AddCircleW(UINT uCard
							   , double dbR
							   , double dbXPos
							   , double dbYPos
							   , int nLayer
							   , BOOL bHatch
							   , int nHatchLayer
							   , wchar_t *szObjName);

#endif //HANS_ADVBASEDLL_926M01B4_82E7_4218J3_B7091_423OPZSCVB