#pragma once
#define  MAC 1
#include <stdint.h>
#include "ocrsys.h"
#include "OcrEngineBase.h"

class COcrEngineYnd : public COcrEngineBase
{
public:
	COcrEngineYnd(void);
	~COcrEngineYnd(void);

	DWORD		init(eOCRLanguage OCRLang);
	DWORD		setOptions(DWORD ocrOptions) {return ESL_SUCCESS;}
	DWORD		exeRecognize(HANDLE hDIB, size_t size, RECT* pRect, ESStringUTF16& Result);

protected:
	HMODULE				m_hYndLib;
	YNDINIT				m_pYndInit;
	YNDEND				m_pYndEnd;
	YNDSETIMAGE			m_pYndSetImage;
	YNDRECOG2			m_pYndRecog;
	YNDGETRESULTCOUNT	m_pYndGetResultCount;
	YNDGETRESULTEX		m_pYndGetResult;

	WORD				m_ErrorCode;

	bool		loadEngine(void);
	bool		getLangMode(eOCRLanguage OCRLang, WORD* pMode);
	bool		setImage(HANDLE hDIB, size_t size, PRMINFO *prm);

};
