/*																	*/
/*		�t�@�C����													*/
/*			ocrsys.h												*/
/*		���e														*/
/*			OCRSYS.DLL ���L�w�b�_									*/
/*		���l														*/
/*																	*/
#ifndef _OCRSYS_H
#define _OCRSYS_H

#ifdef MAC
#pragma pack(push, 8) // OCR���W���[���͑S��8byte�A���C�����g����Ă��邽�ߊO���̃w�b�_�[�t�@�C���ɂ�8byte�A���C�����g��ݒ肷��
#endif

/* ����` ==========================================================*/

/* �t�@�C���̌`�� ------------------------------------*/

/* �摜�t�@�C���`�� */

#define		YND_IMG_BMP				1		/* bmp				*/
#define		YND_IMG_TIFF			2		/* tiff(�񈳏k)		*/
#define		YND_IMG_TIFFMH			3		/* tiff(MH)			*/
#define		YND_IMG_TIFFPB			4		/* tiff(PackBits)	*/
#define		YND_IMG_TIFFG4			7		/* tiff(G4)			*/
#define		YND_IMG_PCX				5		/* pcx				*/
#define		YND_IMG_JPEG			6		/* jpeg				*/
#define		YND_IMG_PNG				8		/* png				*/
#define		YND_IMG_PDF				9		/* pdf				*/

/* ���ʏo�͌`�� */

#define		YND_RST_TXT				1		/* �e�L�X�g�itxt�j		*/
#define		YND_RST_WRI				2		/* ���C�g�iwri�j		*/
#define		YND_RST_RTF				3		/* �����t���irtf�j		*/
#define		YND_RST_HTM				4		/* HTML�`��				*/
#define		YND_RST_CSV				5		/* CSV�`��				*/
#define		YND_RST_SLK				6		/* SYLK�`��				*/
#define		YND_RST_XLS				7		/* Microsoft Excel�`��	*/
#define		YND_RST_JTD				8		/* �ꑾ�Y�`��			*/
#define		YND_RST_PDF				9		/* Acrobat PDF�`��		*/
#define		YND_RST_CSS				16		/* HTML(CSS)�`��		*/

/* ���ʏo�͌`���i�ݒ�t�j */

#define		YND_RST_RTF_LAYOUT		10		/* �����t���irtf�j���C�A�E�g	*/
#define		YND_RST_RTF_DANGUMI		11		/* �����t���irtf�j�i�g��		*/
#define		YND_RST_JTD_LAYOUT		12		/* �ꑾ�Y�`��	���C�A�E�g		*/
#define		YND_RST_JTD_DANGUMI		13		/* �ꑾ�Y�`��	�i�g��			*/
#define		YND_RST_PDF_NORMAL		14		/* Acrobat PDF�`��	�W��		*/
#define		YND_RST_PDF_HIDDEN		15		/* Acrobat PDF�`��	�����e�L�X�g*/

/* Office OpenXML�`�� */
#define		YND_RST_DOCX_LAYOUT		20		/* DOCX�`�� ���C�A�E�g */
#define		YND_RST_XLSX_LAYOUT		22		/* XLSX�`�� ���C�A�E�g */
#define		YND_RST_PPTX_LAYOUT		24		/* PPTX�`�� ���C�A�E�g */



/* �ݒ�l�Ȃ� ------------------------------------*/

/* �����R�[�h */

#define		YND_CODE_JIS			1		/* JIS */
#define		YND_CODE_SJIS			2		/* SJIS */
#define		YND_CODE_UNICODE		3		/* Unicode */

/* �\�r���̕��� */

#define		YND_TL_VERTICAL			1		/* ������ */
#define		YND_TL_HORIZONTAL		2		/* ������ */

/* �摜�ҏW */

#define		YND_MODIMG_NOISE1		1		/* �m�C�Y�����i���j	*/
#define		YND_MODIMG_NOISE2		2		/* �m�C�Y�����i���j	*/
#define		YND_MODIMG_NOISE3		3		/* �m�C�Y�����i��j	*/
#define		YND_MODIMG_REVERSE		4		/* �������]			*/
#define		YND_MODIMG_TRIM			5		/* �g���~���O		*/

/* �g�w��֘A */

#define		YND_RECOG_PRESET		0xffff	/* �F�����Ɋ��ݒ�l�𗘗p���� */
#define		YND_RECOG_ALLRGN		0xffff	/* �S�Ă̗̈��ΏۂƂ��� */

/* �����D��x */

#define		YND_ANALYSISPRIORITY_SPEED		1	/* ���x�D���� */
#define		YND_ANALYSISPRIORITY_ACCURACY	2	/* ���x�D���� */


/* �����X�L���� --------------------------------------*/
#define		YND_SCAN_RES_300		1		/* 300dpi */
#define		YND_SCAN_RES_400		2		/* 400dpi */
#define		YND_SCAN_RES_600		4		/* 600dpi */

#define		YND_SCAN_MODE_BW		1		/* �����i1bit�j*/
#define		YND_SCAN_MODE_GRAY		2		/* �O���[�X�P�[���i8bit�j*/
#define		YND_SCAN_MODE_COLOR		4		/* �t���J���[(24bit) */

#define		YND_SCAN_DOC_NEWSPAPER	1		/* �V�� */
#define		YND_SCAN_DOC_MAGAZINE	2		/* �G�� */
#define		YND_SCAN_DOC_BOOK		3		/* ���� */
#define		YND_SCAN_DOC_TYPEWRITER	4		/* ���[�v�����e */
#define		YND_SCAN_DOC_THRESHOLD	9		/* �������l�w�� */

#define		YND_SCAN_DEN_DARK_H		5		/* �Z�� */
#define		YND_SCAN_DEN_DARK_L		4		/* �������Z�� */
#define		YND_SCAN_DEN_NORMAL		3		/* ���� */
#define		YND_SCAN_DEN_LIGHT_L	2		/* ���������� */
#define		YND_SCAN_DEN_LIGHT_H	1		/* ������ */

#define		YND_SCAN_PAPER_A3		1		/* A3 */
#define		YND_SCAN_PAPER_B4		2		/* B4 */
#define		YND_SCAN_PAPER_A4_P		3		/* A4�c */
#define		YND_SCAN_PAPER_A4_L		4		/* A4�� */
#define		YND_SCAN_PAPER_B5_P		5		/* B5�c */
#define		YND_SCAN_PAPER_B5_L		6		/* B5�� */
#define		YND_SCAN_PAPER_AREA		7		/* �͈͎w�� */

/* �F���p�����[�^ ------------------------------------*/

/* �̈��� */
#define		YND_RGN_CHAR			1		/* �����̈� */
#define		YND_RGN_TABLE			2		/* �\�̈� */
#define		YND_RGN_IMAGE			3		/* �Ұ�ޗ̈� */
#define		YND_RGN_CAPTION			4		/* ���o���̈� */

/* ���[�h */
#define		YND_MOD_JAPANESE		1		/* ���{�� */
#define		YND_MOD_ENGLISH			2		/* �p�� */
#define		YND_MOD_MIXED			3		/* ���p���� */

/* ���[�h(������OCR) */
#define		YND_MOD_2BYTE			YND_MOD_JAPANESE	/* 2byte���� */
#define		YND_MOD_1BYTE			YND_MOD_ENGLISH		/* 1byte���� */
//#define	YND_MOD_MIXED			3					/* 2byte����1byte���ꍬ�� */

/* ����t���O(������OCR) */
#define		YND_LNG_2BYTE_JP		(1<<4)	/* ���{�� */
#define		YND_LNG_2BYTE_ZHT		(2<<4)	/* ������(�ɑ̎�) */
#define		YND_LNG_2BYTE_ZHS		(3<<4)	/* ������(�ȑ̎�) */
#define		YND_LNG_2BYTE_KO		(4<<4)	/* ���N��(�n���O��) */

#define		YND_LNG_1BYTE_EN		(1<<8)	/* �p�� */
#define		YND_LNG_1BYTE_FR		(2<<8)	/* �t�����X�� */
#define		YND_LNG_1BYTE_IT		(3<<8)	/* �C�^���A�� */
#define		YND_LNG_1BYTE_DE		(4<<8)	/* �h�C�c�� */
#define		YND_LNG_1BYTE_ES		(5<<8)	/* �X�y�C���� */
#define		YND_LNG_1BYTE_PT		(6<<8)	/* �|���g�K���� */
#define		YND_LNG_1BYTE_NL		(7<<8)	/* �I�����_�� */
#define		YND_LNG_1BYTE_RU		(8<<8)	/* ���V�A�� */
#define		YND_LNG_1BYTE_UK		(9<<8)	/* �E�N���C�i�� */
#define		YND_LNG_1BYTE_PL		(10<<8)	/* �|�[�����h�� */
#define		YND_LNG_1BYTE_CS		(11<<8)	/* �`�F�R�� */
#define		YND_LNG_1BYTE_SK		(12<<8)	/* �X���o�L�A�� */
#define		YND_LNG_1BYTE_RO		(13<<8)	/* ���[�}�j�A�� */
#define		YND_LNG_1BYTE_HU		(14<<8)	/* �n���K���[�� */
#define		YND_LNG_1BYTE_FI		(15<<8)	/* �t�B�������h�� */
#define		YND_LNG_1BYTE_SV		(16<<8)	/* �X�E�F�[�f���� */
#define		YND_LNG_1BYTE_NO		(17<<8)	/* �m���E�F�[�� */
#define		YND_LNG_1BYTE_DA		(18<<8)	/* �f���}�[�N�� */
#define		YND_LNG_1BYTE_TR		(19<<8)	/* �g���R�� */
#define		YND_LNG_1BYTE_EL		(20<<8)	/* �M���V���� */

/* �X�^�C�� */
#define		YND_STL_AUTO			1		/* �������� */
#define		YND_STL_YOKO			2		/* ������ */
#define		YND_STL_TATE			3		/* �c���� */

/* �i�g�ݔ��� */
#define		YND_DANGUMI_ON			1		/* ���� */
#define		YND_DANGUMI_OFF			0		/* ���Ȃ� */

/* ������␳ */
#define		YND_KSR_ON				1		/* ���� */
#define		YND_KSR_OFF				0		/* ���Ȃ� */

/* ���ꏈ�� */
#define		YND_WDC_ON				1		/* ���� */
#define		YND_WDC_OFF				0		/* ���Ȃ� */

/* �Ώە����� */
#define		YND_CHR_ALL				1		/* �S������ */
#define		YND_CHR_PART			2		/* �ʎw�蕶���� */

/* �ʎw�蕶���� */
#define		YND_CHRPT_SYMBOL		0x0001	/* �L�� */
#define		YND_CHRPT_ALPHA			0x0002	/* �A���t�@�x�b�g */
#define		YND_CHRPT_NUM			0x0004	/* ���� */
#define		YND_CHRPT_HIRA			0x0008	/* �Ђ炪�� */
#define		YND_CHRPT_KATA			0x0010	/* �J�^�J�i */
#define		YND_CHRPT_KANJI1		0x0020	/* ��1��������(����1) */
#define		YND_CHRPT_KANJI2		0x0040	/* ��2��������(����2) */
#define		YND_CHRPT_ALL			0x007f	/* ���ׂ� */

/* ���s���ނ̑}�� */
#define		YND_CR_LINE				1		/* �s�P�� */
#define		YND_CR_SENTENCE			2		/* ���P�� */
#define		YND_CR_PARAGRAPH		3		/* �i���P�� */

/* ��؂蕶�� */
#define		YND_DLM_TAB				1		/* �^�u */
#define		YND_DLM_COMMA			2		/* �J���} */

/* ��߰������̑}�� */
#define		YND_SPCHR_ON			1		/* ���� */
#define		YND_SPCHR_OFF			0		/* ���Ȃ� */

/* ��߰��s�̑}�� */
#define		YND_SPLINE_ON			1		/* ���� */
#define		YND_SPLINE_OFF			0		/* ���Ȃ� */

/* �L���̔��p���� */
#define		YND_HLFSYMBOL_ON		1		/* ���� */
#define		YND_HLFSYMBOL_OFF		0		/* ���Ȃ� */

/* ��̧�ޯĂ̔��p���� */
#define		YND_HLFALPHA_ON			1		/* ���� */
#define		YND_HLFALPHA_OFF		0		/* ���Ȃ� */

/* �����̔��p���� */
#define		YND_HLFNUM_ON			1		/* ���� */
#define		YND_HLFNUM_OFF			0		/* ���Ȃ� */

/* ���ł̔��p���� */
#define		YND_HLFKATA_ON			1		/* ���� */
#define		YND_HLFKATA_OFF			0		/* ���Ȃ� */

/* �Z���̑��� ----------------------------------------*/

/* ���[�h�i���{��E�p��͔F���p�����[�^���ʁj */
#define		YND_MOD_SPECIAL			4		/* �f�[�^�w�� */
#define		YND_MOD_LIMITTEXT		5		/* ���蕶���� */

/* �f�[�^�w�� */
#define		YND_SPECIAL_ADDRESS		1		/* �Z�� */
#define		YND_SPECIAL_TEL_FAX		2		/* TEL/FAX */
#define		YND_SPECIAL_VALUE		3		/* ���l */
#define		YND_SPECIAL_AMOUNT		4		/* ���z */

/* �r���̐��� */
#define		YND_LINESTYLE_BLIND		0x0000	/* ���� */
#define		YND_LINESTYLE_SOLID		0x0001	/* ���� */
#define		YND_LINESTYLE_DOTTED	0x0002	/* �_�� */
#define		YND_LINESTYLE_BROKEN	0x0003	/* �j�� */
#define		YND_LINESTYLE_DOUBLE	0x0004	/* ��d�� */
#define		YND_LINESTYLE_MIXED		0x000f	/* ���퍬�� */


/* �F���� ------------------------------------------*/

/* �\�̈�̒��o */
#define		YND_EXTTBL_ON			1		/* ���� */
#define		YND_EXTTBL_OFF			0		/* ���Ȃ� */

/* �Ұ�ޗ̈�̒��o */
#define		YND_EXTIMG_ON			1		/* ���� */
#define		YND_EXTIMG_OFF			0		/* ���Ȃ� */

/* �̈撊�o��ɒi�g�݂Ȃ� */
#define 	YND_SETDANOFF_ON		1		/* ���� */
#define		YND_SETDANOFF_OFF		0		/* ���Ȃ� */

/* ���ްײ݂̏��� */
#define		YND_RMVUL_ON			1		/* ���� */
#define		YND_RMVUL_OFF			0		/* ���Ȃ� */

/* �\�̾ٓ��̌r���ǉ� */
#define		YND_APDCELLN_ON			1		/* ���� */
#define		YND_APDCELLN_OFF		0		/* ���Ȃ� */

/* RTF�`���o�� */
#define		YND_RTF_LAYOUT			1		/* ���C�A�E�g */
#define		YND_RTF_DANGUMI			2		/* �i�g�� */

/* ���p�ϊ��L���̎w�� */
#define		YND_HLFSYMSET_ON		1		/* ���� */
#define		YND_HLFSYMSET_OFF		0		/* ���Ȃ� */

/* �F����(OCRENV3) ---------------------------------*/

/* Excel�o�͂̃Z������ (Ver.5�ȍ~��YND_XLSCELLMERGE_ON�Œ�) */
#define		YND_XLSCELLMERGE_ON		1		/* ���� */
#define		YND_XLSCELLMERGE_OFF	0		/* ���Ȃ� */

/* Excel�o�͂̃Z�������f�[�^�ɍ��킹�� (Ver.5�ȍ~��YND_XLSAUTOFIT_OFF�Œ�) */
#define		YND_XLSAUTOFIT_ON		1		/* ���� */
#define		YND_XLSAUTOFIT_OFF		0		/* ���Ȃ� */

/* �Ԃꂩ����G���W���E�\����̓G���W�� */
#define		YND_INTENGINE_NONE		0x0000	/* ���p���Ȃ�				*/
#define		YND_INTENGINE_TUBURE	0x0001	/* �Ԃ�G���W���̂ݗ��p	*/
#define		YND_INTENGINE_KASURE	0x0002	/* ������G���W���̂ݗ��p	*/
#define		YND_INTENGINE_KOUBUN	0x0010	/* �\����̓G���W���̂ݗ��p	*/
#define		YND_INTENGINE_TUBKAS	0x0003	/* �Ԃ�E�����ꗘ�p(�W��)	*/
#define		YND_INTENGINE_FULL		0x0013	/* ���ׂė��p				*/

/* ���p�ꎫ�� */
#define		YND_SDC_MEDIC			0x00000002	/* ��w��b */
#define		YND_SDC_SURGERY			0x00000004	/* �O�ȥ���`�O�� */
#define		YND_SDC_INMEDIC			0x00000008	/* ���ȥ������ */
#define		YND_SDC_CEREBRA			0x00000010	/* �]�_�o��򗝥�����w */
#define		YND_SDC_NARCOS			0x00000020	/* �����ȥ�~�}��� */
#define		YND_SDC_DENTAL			0x00000040	/* ���� */
#define		YND_SDC_PHARMAC			0x00000080	/* ��w */
#define		YND_SDC_BIOTEC			0x00000100	/* �o�C�I�e�N�m���W�[ */
#define		YND_SDC_CHEMIST			0x00000200	/* ���w��b */
#define		YND_SDC_METAL			0x00000400	/* ������Z���~�b�N�X */
#define		YND_SDC_PLASTIC			0x00000800	/* �v���X�`�b�N */
#define		YND_SDC_PHYSICS			0x00001000	/* �����w */
#define		YND_SDC_ATOMIC			0x00002000	/* ���q�� */
#define		YND_SDC_ELEC			0x00004000	/* �d�C�H�w */
#define		YND_SDC_TELECOM			0x00008000	/* �d�q��ʐM�H�w */
#define		YND_SDC_COMPUTR			0x00010000	/* �R���s���[�^ */
#define		YND_SDC_MECHA			0x00020000	/* �@�B�H�w */
#define		YND_SDC_AUTOMOB			0x00040000	/* ������ */
#define		YND_SDC_SHIP			0x00080000	/* ���D�H�w */
#define		YND_SDC_AERO			0x00100000	/* �q��F���H�w */
#define		YND_SDC_INDUST			0x00200000	/* �Ǘ��H�w */
#define		YND_SDC_CIVIL			0x00400000	/* �y�؍H�w */
#define		YND_SDC_ARCH			0x00800000	/* ���z�H�w */
#define		YND_SDC_ECONOMY			0x01000000	/* �o�� */
#define		YND_SDC_FINANCE			0x02000000	/* ���Z��،� */
#define		YND_SDC_TRADE			0x04000000	/* ���ƥ�f�� */
#define		YND_SDC_PATENT			0x08000000	/* ���� */
#define		YND_SDC_ENVIRON			0x10000000	/* �� */
#define		YND_SDC_WELFARE			0x20000000	/* ���� */
#define		YND_SDC_COOKING			0x40000000	/* ���� */
#define		YND_SDC_LAW				0x80000000	/* �@�w */	

/* �F����(OCRENV5) ---------------------------------*/

/* Excel�̏o�͕��� */
#define		YND_XLSLAYOUT_LAYOUT	1		/* ���C�A�E�g�Č� */
#define		YND_XLSLAYOUT_DATA		2		/* �f�[�^���p */

/* �Z���̑������o */
#define		YND_EXTCELLATTR_NON			0x0000	/* �g�����o�Ȃ� */
#define		YND_EXTCELLATTR_LINEKIND	0x0001	/* �r����i�ڍׁj */
#define		YND_EXTCELLATTR_LINECOLOR	0x0002	/* �r���F���o */
#define		YND_EXTCELLATTR_CELLBGCOLOR	0x0004	/* �Z���w�i�F���o */

/* �F�����ʏo�͐ݒ� -----------------------------------*/

/* PDF�֘A */
#define		YND_RSTEXT_PDF_THUMB	0x0001	/* PDF���T���l�C�����ŏo�͂��� */
#define		YND_RSTEXT_PDF_TAG		0x0002	/* PDF���^�O���ŏo�͂��� */
/* �o�͉𑜓x�i�ݒ肵�Ȃ��ꍇ�͌��摜�̉𑜓x�j*/
#define		YND_RSTEXT_IMGRES_72	0x0100	/* ���ʒ��̉摜�̏o�͉𑜓x��72dpi */
#define		YND_RSTEXT_IMGRES_96	0x0200	/* ���ʒ��̉摜�̏o�͉𑜓x��96dpi */
#define		YND_RSTEXT_IMGRES_150	0x0400	/* ���ʒ��̉摜�̏o�͉𑜓x��150dpi */
#define		YND_RSTEXT_IMGRES_200	0x0800	/* ���ʒ��̉摜�̏o�͉𑜓x��200dpi */

/* ���ʃe�L�X�g�̕\�̈��� */
#define		YND_RSLINE_LINE			1		/* �\�͍s���Ƃɏo�� */
#define		YND_RSLINE_CELL			2		/* �\�͂ЂƂ̃Z�����s�Ƃ��ďo�� */

/* ���[�U���� ----------------------------------------*/

#define		YND_DIC_USROCR			1		/* ���[�U�F������ */
#define		YND_DIC_USRWRD			3		/* ���[�U�P�ꎫ�� */

/* �G���[�R�[�h --------------------------------------*/

#define		YND_ERR_SUCCESS			0		/* ���� */

#define		YND_ERR_NOSYSTEM		101		/* �F�������Ȃ�	*/
#define		YND_ERR_DICLOAD			102		/* �������[�h		*/
#define		YND_ERR_NOINIT			103		/* ����������Ă��Ȃ� */
#define		YND_ERR_INVALIDVALUE	104		/* �s���Ȉ���		*/
#define		YND_ERR_NODATA			105		/* �f�[�^���Ȃ�		*/
#define		YND_ERR_MEMORY			106		/* �������s��		*/
#define		YND_ERR_NOLAYOUT		107		/* �̈撊�o�Řg�����o����Ȃ����� */
#define		YND_ERR_OUTOFRANGE		108		/* �l���͈͊O */

#define		YND_ERR_FILECREATE		110		/* �t�@�C���쐬		*/
#define		YND_ERR_FILEOPEN		111		/* �t�@�C���I�[�v��	*/
#define		YND_ERR_FILEREAD		112		/* �t�@�C���ǂݍ���	*/
#define		YND_ERR_FILEWRITE		113		/* �t�@�C�������o��	*/
#define		YND_ERR_FILENOTEXIST	114		/* �t�@�C���Ȃ�		*/
#define		YND_ERR_DISKFULL		115		/* �f�B�X�N�t��		*/
#define		YND_ERR_FILEKIND		116		/* �t�@�C�����		*/

#define		YND_ERR_STOP			120		/* ���f				*/
#define		YND_ERR_WORKING			121		/* ��ƒ�			*/
#define		YND_ERR_OTHER			127		/* ���̑�			*/

/* �G���[�R�[�h (���[�U�����֌W)-----------------------*/

#define		YND_ERR_CHARNODATA		131		/* �F�������f�[�^�쐬�s�� */
#define		YND_ERR_CHARMAX			132		/* �F����������t */
#define		YND_ERR_SPACEINCLUDE	133		/* �P����ɃX�y�[�X���܂܂�Ă��� */
#define		YND_ERR_HANKAKUINCLUDE	134		/* �P����ɔ��p�������܂܂�Ă��� */
#define		YND_ERR_SYMBOLSTART		135		/* �P�ꂪ�L���Ŏn�܂��Ă��� */
#define		YND_ERR_WORDEXIST		136		/* �P�ꂪ���ɓo�^����Ă��� */
#define		YND_ERR_WORDMAX			137		/* �P�ꎫ������t */
/* �G���[�R�[�h (�����ŗL)-----------------------------*/

#define		YND_ERR_RESOLUTION		151		/* �𑜓x���ΏۊO */
#define		YND_ERR_NONTABLE		152		/* �\�̈�łȂ� */
#define		YND_ERR_NONSUPPRESS		153		/* �X�L���i�������X�L�����ΏۂłȂ� */
#define		YND_ERR_ENGAGED			154		/* �i�r���ȂǂŁj���łɎg���Ă��� */
#define		YND_ERR_MAX				155		/* ����l */

/* ����l�Ȃ� -----------------------------------------*/

#define		YND_LENGTH_LIMITTEXT	64

#ifdef	_WIN32
#define		YNDAPI					WINAPI
#define		YNDCALLBACK				CALLBACK
#define		YNDRESULT				BOOL
#define		YNDBOOL					BOOL
#define		YNDUINT16				WORD
#define		YNDUINT32				DWORD
#define		YNDLPCWSTR				LPCWSTR
#define		YNDLPSTR				LPSTR
#define		YNDLPCSTR				LPCSTR
#else
#define		YNDAPI
#define		YNDCALLBACK
#define		YNDRESULT				int
#define		YNDBOOL					int
#define		YNDUINT16				unsigned short
#ifdef	MAC	// 64-bit process
#define		YNDUINT32				unsigned int
#else
#define		YNDUINT32				unsigned long
#endif	// MAC
#define		YNDLPCWSTR				const unsigned short*
#define		YNDLPSTR				unsigned char*
#define		YNDLPCSTR				const unsigned char*
#endif

/* API�߂�l�Ȃ� --------------------------------------*/
#ifdef	_WIN32
#define		YND_TRUE				TRUE
#define		YND_FALSE				FALSE
#define		YND_OK					TRUE
#define		YND_FAIL				FALSE
#else
#define		YND_TRUE				1
#define		YND_FALSE				0
#define		YND_OK					1
#define		YND_FAIL				0
#endif

/* �\���� ==========================================================*/

/* �摜�̈� */
#if defined _WIN32
#define		YNDRECT					RECT
#elif MAC
typedef struct YNDRECT_t {
	int32_t left;
	int32_t top;
	int32_t right;
	int32_t bottom;
}  YNDRECT , *LPYNDRECT;
typedef void   *YNDHANDLE;         //!< A pointer to any type.
#else
typedef struct YNDRECT_t {
	long	left ;
	long	top ;
	long	right ;
	long	bottom ;
} YNDRECT , *LPYNDRECT ;
#endif

/* �F���g�̃p�����[�^�ݒ� */
typedef struct PRMINFO_t {
	YNDRECT		rcTarget;			/* �Ώۗ̈�			*/

	YNDUINT16	wRgnKind;			/* �̈���			*/
	YNDUINT16	wMode;				/* ���[�h			*/
	YNDUINT16	wStyle;				/* �X�^�C��			*/
	YNDUINT16	wDangumi;			/* �i�g�ݔ���		*/
	YNDUINT16	wKasure;			/* ������␳		*/
	YNDUINT16	wWdchk;				/* ���ꏈ�����s��	*/

	YNDUINT16	wChrKind;			/* �Ώە�����		*/
	YNDUINT16	wChrPart;			/* �ʎw�蕶����	*/

	YNDUINT16	wCreturn;			/* ���s�}��			*/
	YNDUINT16	wDelimit;			/* ��؂蕶��		*/
	YNDUINT16	wSpaceChar;			/* �X�y�[�X�����}��	*/
	YNDUINT16	wSpaceLine;			/* �X�y�[�X�s�}��	*/
	YNDUINT16	wHlfSymbol;			/* �L�����p�w��		*/
	YNDUINT16	wHlfAlpha;			/* �A���t�@�x�b�g���p�w�� */
	YNDUINT16	wHlfNum;			/* �������p�w��		*/
	YNDUINT16	wHlfKata;			/* �J�^�J�i���p�w��	*/
} PRMINFO , *LPPRMINFO ;

/* ���蕶����f�[�^ */
typedef struct YDLIMITTEXT_t {
	YNDUINT16	wLimitStringNum ;	//!< ���蕶����̌�
	YNDUINT16	wReserve ;			//!< ���U�[�u
	YNDLPCWSTR	pLimitString ;		//!< ������ւ̃|�C���^
									// ������͈ȉ��̌`���ŕۑ�����Ă�����̂Ƃ���
									// <string1>\0<string2>\0<string3>\0\0
} YDLIMITTEXT , *LPYDLIMITTEXT ;

/* �F���g�̊g���p�����[�^�ݒ� */
typedef struct PRMINFO2_t {
	YNDBOOL		bLimit ;				// ���蕶����F�����s���ꍇ��TRUE
	YNDUINT16	wUseID ;				// ���p������蕶���񃊃X�g��ID
	PRMINFO		stParamInfo ;			// PRMINFO�\����
	YDLIMITTEXT	stLimitTextList[10] ;	// 10�܂ł̌��蕶���񃊃X�g
} PRMINFO2 , *LPPRMINFO2 ;

/* �F�����ʂ̕����f�[�^ */
typedef struct RSTCHAR_t {
	YNDUINT16	wChar;				/* ���ʕ���		*/
	YNDUINT16	wList[10];			/* ��╶���ꗗ	*/
	YNDRECT		rcPos;				/* �摜���̈ʒu	*/
} RSTCHAR , *LPRSTCHAR ;

/* �F�����ʂ̕����f�[�^�Q */
typedef struct RSTCHAREX_t {
	YNDUINT16	wChar;				/* ���ʕ���		*/
	YNDUINT16	wList[10];			/* ��╶���ꗗ	*/
	YNDUINT16	wDist[10];			/* �e��╶���̋��� */
	YNDRECT		rcPos;				/* �摜���̈ʒu	*/
} RSTCHAREX , *LPRSTCHAREX ;

/* �F���� */
typedef struct OCRENV_t {
	YNDUINT16	wExtractTable;		/*�����̈撊�o���ɕ\�̈�𒊏o */
	YNDUINT16	wExtractImage;		/* �����̈撊�o���ɃC���[�W�̈�𒊏o */
	YNDUINT16	wSetDangumiOff;		/* �����̈撊�o��̗̈�͒i�g�݂Ȃ��ɂ��� */
	YNDUINT16	wRemoveUnderline;	/* �����̏��� */
	YNDUINT16	wAppendCellLine;	/* �\�̃Z�����Ɍr����ǉ� */
	YNDUINT16	wRtfStyle;			/* RTF�o�͕��� */
	YNDUINT16	wHalfSymbol;		/* �w��L���̂ݔ��p�ϊ� */
	YNDUINT16	wHalfSymbolData[6];	/* ���p�w��x37 */
} OCRENV , *LPOCRENV ;

typedef struct OCRENV3_t {
	YNDUINT16	wExtractTable;		/*�����̈撊�o���ɕ\�̈�𒊏o */
	YNDUINT16	wExtractImage;		/* �����̈撊�o���ɃC���[�W�̈�𒊏o */
	YNDUINT16	wSetDangumiOff;		/* �����̈撊�o��̗̈�͒i�g�݂Ȃ��ɂ��� */
	YNDUINT16	wRemoveUnderline;	/* �����̏��� */
	YNDUINT16	wAppendCellLine;	/* �\�̃Z�����Ɍr����ǉ� */
	YNDUINT16	wRtfStyle;			/* RTF�o�͕��� */
	YNDUINT16	wHalfSymbol;		/* �w��L���̂ݔ��p�ϊ� */
	YNDUINT16	wHalfSymbolData[6];	/* ���p�w��x37 */
	YNDUINT16	wExcelCellAutoFit;	/* Excel�o�͂ŃZ�������f�[�^�ɍ��킹��i�݊����̂��߂Ɏc����Ă��܂��j */
	YNDUINT16	wExcelCellMerge;	/* Excel�o�͂ŃZ������������i�݊����̂��߂Ɏc����Ă��܂��j */
	YNDUINT16	wEngineMode;		/* �Ԃꂩ����E�`�ԑf��̓��[�h�ݒ� */
	YNDUINT32	dwSpecialDic;		/* ���p�ꎫ���ݒ� */
	YNDUINT16	wResultFlag;		/* �F�����ʏo�͐ݒ� */
	YNDUINT16	wResurved;			/* �����̂��߂ɗ\�񂳂�Ă��܂� */
} OCRENV3 , *LPOCRENV3 ;

typedef struct OCRENV5_t {
	YNDUINT16	wSize;				/* OCRENV5�\���̂̃T�C�Y���w�� (sizeof(OCRENV5)) OCRENV5�ǉ� */		
	YNDUINT16	wExtractTable;		/*�����̈撊�o���ɕ\�̈�𒊏o */
	YNDUINT16	wExtractImage;		/* �����̈撊�o���ɃC���[�W�̈�𒊏o */
	YNDUINT16	wSetDangumiOff;		/* �����̈撊�o��̗̈�͒i�g�݂Ȃ��ɂ��� */
	YNDUINT16	wRemoveUnderline;	/* �����̏��� */
	YNDUINT16	wAppendCellLine;	/* �\�̃Z�����Ɍr����ǉ� */
	YNDUINT16	wRtfStyle;			/* RTF�o�͕��� */
	YNDUINT16	wHalfSymbol;		/* �w��L���̂ݔ��p�ϊ� */
	YNDUINT16	wHalfSymbolData[6];	/* ���p�w��x37 */
	YNDUINT16	wExcelCellAutoFit;	/* Excel�o�͂ŃZ�������f�[�^�ɍ��킹��i�݊����̂��߂Ɏc����Ă��܂��j */
	YNDUINT16	wExcelCellMerge;	/* Excel�o�͂ŃZ������������i�݊����̂��߂Ɏc����Ă��܂��j */
	YNDUINT16	wEngineMode;		/* �Ԃꂩ����E�`�ԑf��̓��[�h�ݒ� */
	YNDUINT32	dwSpecialDic;		/* ���p�ꎫ���ݒ� */
	YNDUINT16	wResultFlag;		/* �F�����ʏo�͐ݒ� */
	YNDUINT16	wExcelLayout;		/* Excel�o�͂̃��[�h */
	YNDUINT16	wExtractCellAttr;	/* �g���\�r����������ݒ� */
	YNDUINT16	wReserved[2];		/* �����̂��߂ɗ\�񂳂�Ă��܂� */
} OCRENV5 , *LPOCRENV5 ;

typedef struct YDIMGINFO_t {
	YNDUINT16	wWidth;				/* �摜�̕� */
	YNDUINT16	wHeight;			/* �摜�̍��� */
	YNDUINT16	wxRes;				/* �����𑜓x */
	YNDUINT16	wyRes;				/* �����𑜓x */
	YNDUINT16	wBitPixel;			/* �F�̃r�b�g���i1=���m�N���Q�l�j */
	YNDUINT16	wReserve1;
	YNDUINT16	wReserve2;
	YNDUINT16	wReserve3;
} YDIMGINFO , *LPYDIMGINFO ;

typedef struct CELLINFO_t {
	YNDRECT		rcCell;
	YNDUINT16	wLeft;
	YNDUINT16	wTop;
	YNDUINT16	wWidth;
	YNDUINT16	wHeight;
	YNDUINT16	wStyleLeft;
	YNDUINT16	wStyleTop;
	YNDUINT16	wStyleRight;
	YNDUINT16	wStyleBottom;
	YNDUINT16	wWidthLeft;			/* �\�� */
	YNDUINT16	wWidthTop;			/* �\�� */
	YNDUINT16	wWidthRight;		/* �\�� */
	YNDUINT16	wWidthBottom;		/* �\�� */
	YNDUINT32	dwColorLeft;		/* �\�� */
	YNDUINT32	dwColorTop;			/* �\�� */
	YNDUINT32	dwColorRight;		/* �\�� */
	YNDUINT32	dwColorBottom;		/* �\�� */
	YNDUINT32	dwCellColor;		/* �\�� */
	YNDUINT16	wReserved[6];		/* �\�� */
} CELLINFO , *LPCELLINFO ;

typedef struct CELLPARAM_t {
	unsigned char	byMode;
	unsigned char	byStyle;
	YNDUINT16	wCharPart;
	YNDUINT16	wSpecial;
	char		szLimitText[YND_LENGTH_LIMITTEXT];
} CELLPARAM , *LPCELLPARAM ;

typedef struct SCANINFO_t {
	YNDUINT16	wResolution;	/* �𑜓x */
	YNDUINT16	wColor;		
	YNDUINT16	wBWDocType;
	YNDUINT16	wThreshold;
	short		nContrast;
	short		nBlightness;
	YNDUINT16	wSize;
	YNDUINT16	wAreaLeft;
	YNDUINT16	wAreaRight;
	YNDUINT16	wAreaTop;
	YNDUINT16	wAreaBottom;
	YNDBOOL		bAdfUse;	
} SCANINFO , *LPSCANINFO ;

typedef struct SETTEXTCALLBACKINFO_t {
	void*		pUserData;
	RSTCHAREX*	pResult;
	YNDUINT16	wCount;
} SETTEXTCALLBACKINFO , *LPSETTEXTCALLBACKINFO ;

/* �������m�ہE����R�[���o�b�N�p�\���� */
typedef struct YNDMALLOC_t {
	void*	pParam ;	// �R�[���o�b�N�p�����[�^
	void*	(YNDCALLBACK* pCbMalloc)(unsigned long size , void* pParam) ;	// �������m��
	void	(YNDCALLBACK* pCbFree)(void* pMem , void* pParam) ;			// ���������
} YNDMALLOC , *LPYNDMALLOC ;

/* �i���R�[���o�b�N */
#if defined _WIN32 || defined MAC
typedef YNDRESULT (YNDCALLBACK* LPYNDPROGRESS)(YNDUINT16) ;
#else
typedef struct YNDPROGRESS_t {
	void*	pParam ;	// �R�[���o�b�N�p�����[�^
	unsigned short	(YNDCALLBACK* pCbProgress)(int progress , void* pParam) ;	// �i���ʒm
} YNDPROGRESS , *LPYNDPROGRESS ;
#endif

/* �֐��^��`�i�^���p�j ============================================*/

typedef YNDRESULT (YNDCALLBACK* SETTEXTCALLBACK)(SETTEXTCALLBACKINFO*, YNDRECT, YNDUINT16);


/* �֐���` ========================================================*/
#ifdef	__cplusplus
extern "C" {
#endif

YNDRESULT YNDAPI	YndInit(YNDUINT16 *pwErrorCode);
void YNDAPI			YndEnd();
#ifdef _WIN32
YNDRESULT YNDAPI	YndLoadImage(YNDLPCSTR lpszFile, YNDUINT16 wPage, YNDUINT16 * pwTotalPage, LPYNDPROGRESS pProgress, YNDUINT16 * pwErrorCode);
YNDUINT16 YNDAPI	YndLayoutRecog(YNDUINT16 *pwRgn, PRMINFO *pPrmInfo, LPYNDPROGRESS pProgress, YNDUINT16 *pwErrorCode);/* Ver.3 */
#endif // _WIN32
YNDUINT16 YNDAPI	YndLayoutRecog2(YNDUINT16 *pwRgn, PRMINFO *pPrmInfo, YNDUINT16 wAnalysisPriority , LPYNDPROGRESS pProgress, YNDUINT16 *pwErrorCode);
#ifdef _WIN32
YNDRESULT YNDAPI	YndRecog(YNDUINT16 wRgn, PRMINFO *pPrmInfo, LPYNDPROGRESS pProgress, YNDUINT16 *pwErrorCode);
#endif // _WIN32
YNDRESULT YNDAPI	YndRecog2(YNDUINT16 wRgn, PRMINFO *pPrmInfo, YNDUINT16 wAnalysisPriority , LPYNDPROGRESS pProgress, YNDUINT16 *pwErrorCode);
YNDRESULT YNDAPI	YndCorrectResult(YNDUINT16 *pwErrorCode);
#ifdef _WIN32
YNDRESULT YNDAPI	YndSaveResult(YNDLPCSTR lpszFilename, YNDUINT16 wType, YNDBOOL bAppend, LPYNDPROGRESS pProgress, YNDUINT16 *pwErrorCode);
YNDRESULT YNDAPI	YndSkewImage(double dAngle, LPYNDPROGRESS pProgress, YNDUINT16 *pwErrorCode);
YNDRESULT YNDAPI	YndGetSkewAngle(double *pdAngle, LPYNDPROGRESS pProgress, YNDUINT16 *pwErrorCode);/* Ver.3 */
#endif // _WIN32
YNDRESULT YNDAPI	YndRotateImage(YNDUINT16 wRotateAngle, LPYNDPROGRESS pProgress, YNDUINT16 * pwErrorCode);
YNDRESULT YNDAPI	YndGetRotateAngle(YNDUINT16 *pwRotateAngle, LPYNDPROGRESS pProgress, YNDUINT16 * pwErrorCode);/* Ver.3 */
YNDUINT16 YNDAPI	YndGetResultCount(YNDUINT16* pwErrorCode);
void YNDAPI			YndFreeImage();
void YNDAPI			YndFreeResult();
#ifdef _WIN32
void YNDAPI			YndFreeLayout();
//#elif MAC
#else
void YNDAPI			YndFreeHandle(YNDHANDLE hHandle);
#endif // _WIN32

YNDUINT32 YNDAPI	YndGetLibVersion();
YNDRESULT YNDAPI	YndGetImageInfo(YDIMGINFO* pInfo, YNDUINT16 *pwErrorCode);
#ifdef _WIN32
YNDRESULT YNDAPI	YndGetEnv5(OCRENV5 *pocrenv, YNDUINT16 *pwErrorCode);
YNDRESULT YNDAPI	YndSetEnv5(OCRENV5 *pocrenv, YNDUINT16 *pwErrorCode);

YNDRESULT YNDAPI	YndSetImage(HANDLE hBitmap, LPYNDPROGRESS pProgress, YNDUINT16 *pwErrorCode);
HANDLE YNDAPI		YndGetImage(YNDUINT16 *pwErrorCode);
HANDLE YNDAPI		YndGetImageEx(YNDUINT16 wType , YNDRECT* rcTarget , YNDUINT16 wResolution , YNDUINT16 wQFactor , YNDUINT16 *pwErrorCode);
HANDLE YNDAPI		YndGetResult(YNDUINT16 wCode, YNDUINT16 *pwErrorCode);
HANDLE YNDAPI		YndGetResultEx(YNDUINT16 wCode, YNDUINT16 *pwErrorCode);
//#elif MAC
#elif __linux
YNDRESULT YNDAPI	YndSetImage(unsigned char* pbyBitmap, unsigned int dwImageSize, LPYNDPROGRESS pProgress, YNDUINT16 *pwErrorCode);
YNDHANDLE YNDAPI	YndGetImageEx(YNDUINT16 wType , YNDRECT* rcTarget , YNDUINT16 wResolution , YNDUINT16 wQFactor , YNDUINT16 *pwErrorCode);
YNDHANDLE YNDAPI	YndGetResultEx(YNDUINT16 wCode, YNDUINT16 *pwErrorCode);
#else
YNDRESULT YNDAPI	YndSetImage(unsigned char* pBitmap, LPYNDPROGRESS pProgress, YNDUINT16 *pwErrorCode);
YNDUINT32 YNDAPI	YndGetImage(unsigned char** ppImageBuffer , LPYNDMALLOC pMalloc , YNDUINT16 *pwErrorCode);
YNDUINT32 YNDAPI	YndGetImageEx(unsigned char** ppImageBuffer , YNDUINT16 wType , YNDRECT* rcTarget , YNDUINT16 wResolution , YNDUINT16 wQFactor , LPYNDMALLOC pMalloc , YNDUINT16 *pwErrorCode);
YNDUINT32 YNDAPI	YndGetResult(YNDUINT16 wCode, RSTCHAR **ppResult , LPYNDMALLOC pMalloc , YNDUINT16 *pwErrorCode);
YNDUINT32 YNDAPI	YndGetResultEx(YNDUINT16 wCode, RSTCHAR **ppResult , LPYNDMALLOC pMalloc , YNDUINT16 *pwErrorCode);
#endif // _WIN32

#ifdef	_WIN32
YNDRESULT YNDAPI	YndSaveImage(YNDLPCSTR lpszFilename, YNDUINT16 wType, YNDBOOL bAppend, LPYNDPROGRESS pProgress, YNDUINT16 *pwErrorCode);
YNDRESULT YNDAPI	YndConvertResolution(LPYNDPROGRESS pProgress, YNDUINT16* pwErrorCode);
YNDUINT16 YNDAPI	YndGetLayoutAll(YNDUINT16 *pwRgn, PRMINFO *pPrmInfo, YNDUINT16 *pwErrorCode);
YNDRESULT YNDAPI	YndGetLayout(YNDUINT16 wRgn, PRMINFO *pPrmInfo, YNDUINT16 *pwErrorCode);
YNDRESULT YNDAPI	YndGetTableInfo(YNDUINT16 wRgnNo, YNDUINT16 *pwColumn, YNDUINT16 *pwLine, YNDUINT16 *pwCellCount, YNDUINT16 *pwErrorCode);
YNDUINT16 YNDAPI	YndGetTableLine(YNDUINT16 wRgnNo, YNDUINT16 wLineNo, YNDUINT16 wFlag, YNDUINT16 *pwErrorCode);
YNDRESULT YNDAPI	YndGetCellInfo(YNDUINT16 wRgnNo, YNDUINT16 wCellNo, CELLINFO* pCellInfo, YNDUINT16 *pwErrorCode);
YNDRESULT YNDAPI	YndSkewImageEx(YNDRECT rcTarget, double dAngle, LPYNDPROGRESS pProgress, YNDUINT16* pwErrorCode);
YNDRESULT YNDAPI	YndGetSkewAngleEx(YNDRECT rcTarget, double *pdAngle, LPYNDPROGRESS pProgress, YNDUINT16 * pwErrorCode);
YNDRESULT YNDAPI	YndModifyImage(YNDRECT rcTarget, YNDUINT16 wCommand, YNDUINT16* pwErrorCode);
void YNDAPI			YndCertifyLicense(YNDLPCSTR szID, YNDLPCSTR szLicenseKey);
YNDRESULT YNDAPI	YndSetLayout(YNDUINT16 wRgnNo, PRMINFO *pPrmInfo, YNDUINT16* pwErrorCode);
YNDRESULT YNDAPI	YndAddLayout(PRMINFO *pPrmInfo, YNDUINT16* pwErrorCode);
YNDRESULT YNDAPI	YndLoadLayout(YNDLPCSTR szFilename, LPYNDPROGRESS pProgress, YNDUINT16* pwErrorCode);
YNDRESULT YNDAPI	YndSaveLayout(YNDLPCSTR szFilename, LPYNDPROGRESS pProgress, YNDUINT16* pwErrorCode);
YNDRESULT YNDAPI	YndSetTextCallback(SETTEXTCALLBACK pCallBack, void* pUserInfo);
YNDRESULT YNDAPI	YndGetTableRecogMode(YNDUINT16 wRgnNo, YNDBOOL* pbDependCell, YNDUINT16* pwErrorCode);
YNDRESULT YNDAPI	YndSetTableRecogMode(YNDUINT16 wRgnNo, YNDBOOL bDependCell, YNDUINT16* pwErrorCode);
YNDRESULT YNDAPI	YndGetCellParam(YNDUINT16 wRgnNo, YNDUINT16 wCellNo, CELLPARAM* pParam, YNDUINT16* pwErrorCode);
YNDRESULT YNDAPI	YndSetCellParam(YNDUINT16 wRgnNo, YNDUINT16 wCellNo, CELLPARAM* pParam, YNDUINT16* pwErrorCode);
YNDRESULT YNDAPI	YndGetResultLine(YNDUINT16 wRgnNo, YNDUINT16 wLine, YNDUINT16 wTableMode, char* pBuffer, YNDUINT16* pwSize, YNDUINT16* pwErrorCode);
YNDUINT16 YNDAPI	YndGetResultLineCount(YNDUINT16 wRgnNo, YNDUINT16 wTableMode, YNDUINT16* pwErrorCode);
YNDUINT16 YNDAPI	YndGetLimitTextCount(YNDUINT16* pwErrorCode);
YNDRESULT YNDAPI	YndGetLimitText(YNDUINT16 wIndex, YNDLPSTR szName, YNDLPSTR szFilename, YNDUINT16* pwErrorCode);
YNDRESULT YNDAPI	YndSetLimitText(YNDUINT16 wIndex, YNDLPCSTR szName, YNDLPCSTR szFilename, YNDUINT16* pwErrorCode);
YNDRESULT YNDAPI	YndAddLimitText(YNDLPCSTR szName, YNDLPCSTR szFilename, YNDUINT16* pwErrorCode);
YNDRESULT YNDAPI	YndDeleteLimitText(YNDUINT16 wIndex, YNDUINT16* pwErrorCode);
YNDRESULT YNDAPI	YndResetLimitText(YNDUINT16* pwErrorCode);
YNDRESULT YNDAPI	YndAddTableLine(YNDUINT16 wRgnNo, YNDUINT16 wFlag, YNDUINT16 wPos, YNDUINT16* pwLineNo, YNDUINT16* pwErrorCode);
YNDRESULT YNDAPI	YndDeleteTableLine(YNDUINT16 wRgnNo, YNDUINT16 wLineNo, YNDUINT16 wFlag, YNDUINT16* pwErrorCode);
YNDRESULT YNDAPI	YndMergeCell(YNDUINT16 wRgnNo, YNDUINT16 wCellNo1, YNDUINT16 wCellNo2, YNDUINT16* pwErrorCode);
YNDRESULT YNDAPI	YndSplitCell(YNDUINT16 wRgnNo, YNDUINT16 wCellNo, YNDUINT16* pwErrorCode);
HANDLE YNDAPI		YndGetOCRHEAD(YNDUINT16* pwErrorCode) ;
YNDRESULT YNDAPI	YndRecogEx(YNDUINT16 wRgn, PRMINFO2 *pPrmInfo, LPYNDPROGRESS pProgress, YNDUINT16 *pwErrorCode);
YNDRESULT YNDAPI	YndAdjustTargetRegion(PRMINFO *pPrmInfo, YNDUINT16 wCommand , YNDUINT16 *wErrCode) ;

// ���[�U����
YNDRESULT YNDAPI	YndCreateUsrDic(YNDLPCSTR lpszDicName, YNDUINT16 wDicType, YNDUINT16 *pwErrorCode);
YNDRESULT YNDAPI	YndCheckUsrDic(YNDLPCSTR lpszDicName, YNDUINT16 wDicType, YNDUINT16 *pwErrorCode);
YNDRESULT YNDAPI	YndDeleteUsrDic(YNDLPCSTR lpszDicName, YNDUINT16 wDicType, YNDUINT16 *pwErrorCode);
YNDRESULT YNDAPI	YndLoadUsrOcrDic(YNDLPCSTR lpszDicName, YNDUINT16 *pwErrorCode);
YNDUINT16 YNDAPI	YndGetUsrTotalChar(YNDUINT16 *pwErrorCode);
YNDRESULT YNDAPI	YndGetUsrChar(YNDUINT16 wNum, YNDUINT16 *pwLength, YNDUINT16 *pwChar, YNDUINT16 *pwErrorCode);
YNDRESULT YNDAPI	YndGetUsrCharImage(YNDUINT16 wNum, unsigned char* lpImage, YNDUINT16 *pwWidth, YNDUINT16 *pwHeight, YNDUINT16 *pwErrorCode);
YNDRESULT YNDAPI	YndAppendUsrChar(YNDUINT16 wLength, YNDUINT16 *pwChar, unsigned char* lpData,
								 YNDUINT16 wWidth, YNDUINT16 wHeight, YNDUINT16 *pwNum, YNDUINT16 *pwErrorCode);
YNDRESULT YNDAPI	YndAppendUsrCharRect(YNDUINT16 wLength, YNDUINT16 *pwChar, YNDRECT rect, YNDUINT16 *pwNum, YNDUINT16 *pwErrorCode);
YNDRESULT YNDAPI	YndDeleteUsrChar(YNDUINT16 wNum, YNDUINT16 *pwErrorCode);
void YNDAPI			YndUnloadUsrOcrDic();
YNDRESULT YNDAPI	YndLoadUsrWrdDic(YNDLPCSTR lpszDicName, YNDUINT16 *pwErrorCode);
YNDUINT16 YNDAPI	YndGetUsrTotalWord(YNDUINT16 *pwErrorCode);
YNDRESULT YNDAPI	YndGetUsrWord(YNDUINT16 wNum, YNDLPSTR lpszWord, YNDUINT16 *pwErrorCode);
YNDRESULT YNDAPI	YndAppendUsrWord(YNDLPCSTR lpszWord, YNDUINT16 *pwNum, YNDUINT16 *pwErrorCode);
YNDRESULT YNDAPI	YndDeleteUsrWord(YNDUINT16 wNum, YNDUINT16 *pwErrorCode);
void YNDAPI			YndUnloadUsrWrdDic();

// �����ݒ�
YNDRESULT YNDAPI	YndGetEnv(OCRENV *pocrenv, YNDUINT16 *pwErrorCode);
YNDRESULT YNDAPI	YndSetEnv(OCRENV ocrenv, YNDUINT16 *pwErrorCode);
YNDRESULT YNDAPI	YndGetEnvEx(OCRENV3 *pocrenv, YNDUINT16 *pwErrorCode); /* Ver.3 */
YNDRESULT YNDAPI	YndSetEnvEx(OCRENV3 *pocrenv, YNDUINT16 *pwErrorCode); /* Ver.3 */

// �X�L���i����
YNDRESULT YNDAPI	YndScanImage(LPYNDPROGRESS pProgress, YNDUINT16 *pwErrorCode);
YNDRESULT YNDAPI	YndSelectSource(YNDUINT16 *pwErrorCode);
YNDRESULT YNDAPI	YndScanImageADF(YNDBOOL bTwainDlg, LPYNDPROGRESS pProgress, YNDUINT16 *pwErrorCode);
YNDRESULT YNDAPI	YndSuppressScanImage(SCANINFO stScanInfo, YNDBOOL* pbNextPage, LPYNDPROGRESS pProgress, YNDUINT16* pwErrorCode);
YNDRESULT YNDAPI	YndSuppressScanNext(YNDBOOL* pbNextPage, LPYNDPROGRESS pProgress, YNDUINT16* pwErrorCode);
YNDRESULT YNDAPI	YndSuppressScanEnd();
YNDRESULT YNDAPI	YndIsSuppressScanner(YNDLPSTR szScannerName, YNDUINT16* pwSize, YNDUINT16* pwErrorCode);
#elif MAC
YNDHANDLE YNDAPI	YndGetOCRHEAD(YNDUINT16* pwErrorCode) ;
#endif // _WIN32

#ifdef	__cplusplus
}
#endif

/* API�֐��̌^��` ====================================================*/
typedef	YNDRESULT (YNDAPI*	YNDINIT)(YNDUINT16 *pwErrorCode);
typedef	void (YNDAPI*		YNDEND)();
#ifdef _WIN32
typedef	YNDRESULT (YNDAPI*	YNDLOADIMAGE)(YNDLPCSTR lpszFile, YNDUINT16 wPage, YNDUINT16 * pwTotalPage, LPYNDPROGRESS pProgress, YNDUINT16 * pwErrorCode);
typedef	YNDUINT16 (YNDAPI*	YNDLAYOUTRECOG)(YNDUINT16 *pwRgn, PRMINFO *pPrmInfo, LPYNDPROGRESS pProgress, YNDUINT16 *pwErrorCode);/* Ver.3 */
#endif // _WIN32
typedef YNDUINT16 (YNDAPI*	YNDLAYOUTRECOG2)(YNDUINT16 *pwRgn, PRMINFO *pPrmInfo, YNDUINT16 wAnalysisPriority , LPYNDPROGRESS pProgress, YNDUINT16 *pwErrorCode);
#ifdef _WIN32
typedef	YNDRESULT (YNDAPI*	YNDRECOG)(YNDUINT16 wRgn, PRMINFO *pPrmInfo, LPYNDPROGRESS pProgress, YNDUINT16 *pwErrorCode);
#endif // _WIN32
typedef YNDRESULT (YNDAPI*	YNDRECOG2)(YNDUINT16 wRgn, PRMINFO *pPrmInfo, YNDUINT16 wAnalysisPriority , LPYNDPROGRESS pProgress, YNDUINT16 *pwErrorCode);
typedef YNDRESULT (YNDAPI*	YNDCORRECTRESULT)(YNDUINT16 *pwErrorCode);
#ifdef _WIN32
typedef	YNDRESULT (YNDAPI*	YNDSAVERESULT)(YNDLPCSTR lpszFilename, YNDUINT16 wType, YNDBOOL bAppend, LPYNDPROGRESS pProgress, YNDUINT16 *pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDSKEWIMAGE)(double dAngle, LPYNDPROGRESS pProgress, YNDUINT16 *pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDGETSKEWANGLE)(double *pdAngle, LPYNDPROGRESS pProgress, YNDUINT16 *pwErrorCode);/* Ver.3 */
#endif // _WIN32
typedef	YNDRESULT (YNDAPI*	YNDROTATEIMAGE)(YNDUINT16 wRotateAngle, LPYNDPROGRESS pProgress, YNDUINT16 * pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDGETROTATEANGLE)(YNDUINT16 *pwRotateAngle, LPYNDPROGRESS pProgress, YNDUINT16 * pwErrorCode);/* Ver.3 */
typedef	YNDUINT16 (YNDAPI*	YNDGETRESULTCOUNT)(YNDUINT16* pwErrorCode);
typedef	void (YNDAPI*		YNDFREEIMAGE)();
typedef	void (YNDAPI*		YNDFREERESULT)();
#ifdef _WIN32
typedef	void (YNDAPI*		YNDFREELAYOUT)();
#elif MAC
typedef	void (YNDAPI*		YNDFREEHANDLE)(YNDHANDLE hHandle);
#endif // _WIN32
typedef	YNDUINT32 (YNDAPI*	YNDGETLIBVERSION)();
typedef	YNDRESULT (YNDAPI*	YNDGETIMAGEINFO)(YDIMGINFO* pInfo, YNDUINT16 *pwErrorCode);
#ifdef	_WIN32
typedef	YNDRESULT (YNDAPI*	YNDGETENV5)(OCRENV5 *pocrenv, YNDUINT16 *pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDSETENV5)(OCRENV5 *pocrenv, YNDUINT16 *pwErrorCode);

typedef	YNDRESULT (YNDAPI*	YNDSETIMAGE)(HANDLE hBitmap, LPYNDPROGRESS pProgress, YNDUINT16 *pwErrorCode);
typedef	HANDLE (YNDAPI*		YNDGETIMAGE)(YNDUINT16 *pwErrorCode);
typedef	HANDLE (YNDAPI*		YNDGETIMAGEEX)(YNDUINT16 wType , YNDRECT* rcTarget , YNDUINT16 wResolution , YNDUINT16 wQFactor , YNDUINT16 *pwErrorCode);
typedef	HANDLE (YNDAPI*		YNDGETRESULT)(YNDUINT16 wCode, YNDUINT16 *pwErrorCode);
typedef	HANDLE (YNDAPI*		YNDGETRESULTEX)(YNDUINT16 wCode, YNDUINT16 *pwErrorCode);
#elif MAC
typedef	YNDRESULT (YNDAPI*	YNDSETIMAGE)(unsigned char* pbyBitmap, unsigned int dwImageSize, LPYNDPROGRESS pProgress, YNDUINT16 *pwErrorCode);
typedef	YNDHANDLE (YNDAPI*		YNDGETIMAGEEX)(YNDUINT16 wType , YNDRECT* rcTarget , YNDUINT16 wResolution , YNDUINT16 wQFactor , YNDUINT16 *pwErrorCode);
typedef	YNDHANDLE (YNDAPI*		YNDGETRESULTEX)(YNDUINT16 wCode, YNDUINT16 *pwErrorCode);
#else
typedef	YNDRESULT (YNDAPI*	YNDSETIMAGE)(unsigned char* pBitmap, LPYNDPROGRESS pProgress, YNDUINT16 *pwErrorCode);
typedef	YNDUINT32 (YNDAPI*	YNDGETIMAGE)(unsigned char** ppImageBuffer , LPYNDMALLOC pMalloc , YNDUINT16 *pwErrorCode);
typedef	YNDUINT32 (YNDAPI*	YNDGETIMAGEEX)(unsigned char** ppImageBuffer , YNDUINT16 wType , YNDRECT* rcTarget , YNDUINT16 wResolution , YNDUINT16 wQFactor , LPYNDMALLOC pMalloc , YNDUINT16 *pwErrorCode);
typedef	YNDUINT32 (YNDAPI*	YNDGETRESULT)(YNDUINT16 wCode, RSTCHAR **ppResult , LPYNDMALLOC pMalloc , YNDUINT16 *pwErrorCode);
typedef	YNDUINT32 (YNDAPI*	YNDGETRESULTEX)(YNDUINT16 wCode, RSTCHAR **ppResult , LPYNDMALLOC pMalloc , YNDUINT16 *pwErrorCode);
#endif	// _WIN32

#ifdef	_WIN32
typedef	YNDRESULT (YNDAPI*	YNDSAVEIMAGE)(YNDLPCSTR lpszFilename, YNDUINT16 wType, YNDBOOL bAppend, LPYNDPROGRESS pProgress, YNDUINT16 *pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDCONVERTRESOLUTION)(LPYNDPROGRESS pProgress, YNDUINT16* pwErrorCode);
typedef	YNDUINT16 (YNDAPI*	YNDGETLAYOUTALL)(YNDUINT16 *pwRgn, PRMINFO *pPrmInfo, YNDUINT16 *pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDGETLAYOUT)(YNDUINT16 wRgn, PRMINFO *pPrmInfo, YNDUINT16 *pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDGETTABLEINFO)(YNDUINT16 wRgnNo, YNDUINT16 *pwColumn, YNDUINT16 *pwLine, YNDUINT16 *pwCellCount, YNDUINT16 *pwErrorCode);
typedef	YNDUINT16 (YNDAPI*	YNDGETTABLELINE)(YNDUINT16 wRgnNo, YNDUINT16 wLineNo, YNDUINT16 wFlag, YNDUINT16 *pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDGETCELLINFO)(YNDUINT16 wRgnNo, YNDUINT16 wCellNo, CELLINFO* pCellInfo, YNDUINT16 *pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDSKEWIMAGEEX)(YNDRECT rcTarget, double dAngle, LPYNDPROGRESS pProgress, YNDUINT16* pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDGETSKEWANGLEEX)(YNDRECT rcTarget, double *pdAngle, LPYNDPROGRESS pProgress, YNDUINT16 * pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDMODIFYIMAGE)(YNDRECT rcTarget, YNDUINT16 wCommand, YNDUINT16* pwErrorCode);
typedef	void (YNDAPI*		YNDCERTIFYLICENSE)(YNDLPCSTR szID, YNDLPCSTR szLicenseKey);
typedef	YNDRESULT (YNDAPI*	YNDSETLAYOUT)(YNDUINT16 wRgnNo, PRMINFO *pPrmInfo, YNDUINT16* pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDADDLAYOUT)(PRMINFO *pPrmInfo, YNDUINT16* pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDLOADLAYOUT)(YNDLPCSTR szFilename, LPYNDPROGRESS pProgress, YNDUINT16* pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDSAVELAYOUT)(YNDLPCSTR szFilename, LPYNDPROGRESS pProgress, YNDUINT16* pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDSETTEXTCALLBACK)(SETTEXTCALLBACK pCallBack, void* pUserInfo);
typedef	YNDRESULT (YNDAPI*	YNDGETTABLERECOGMODE)(YNDUINT16 wRgnNo, YNDBOOL* pbDependCell, YNDUINT16* pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDSETTABLERECOGMODE)(YNDUINT16 wRgnNo, YNDBOOL bDependCell, YNDUINT16* pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDGETCELLPARAM)(YNDUINT16 wRgnNo, YNDUINT16 wCellNo, CELLPARAM* pParam, YNDUINT16* pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDSETCELLPARAM)(YNDUINT16 wRgnNo, YNDUINT16 wCellNo, CELLPARAM* pParam, YNDUINT16* pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDGETRESULTLINE)(YNDUINT16 wRgnNo, YNDUINT16 wLine, YNDUINT16 wTableMode, char* pBuffer, YNDUINT16* pwSize, YNDUINT16* pwErrorCode);
typedef	YNDUINT16 (YNDAPI*	YNDGETRESULTLINECOUNT)(YNDUINT16 wRgnNo, YNDUINT16 wTableMode, YNDUINT16* pwErrorCode);
typedef	YNDUINT16 (YNDAPI*	YNDGETLIMITTEXTCOUNT)(YNDUINT16* pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDGETLIMITTEXT)(YNDUINT16 wIndex, YNDLPSTR szName, YNDLPSTR szFilename, YNDUINT16* pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDSETLIMITTEXT)(YNDUINT16 wIndex, YNDLPCSTR szName, YNDLPCSTR szFilename, YNDUINT16* pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDADDLIMITTEXT)(YNDLPCSTR szName, YNDLPCSTR szFilename, YNDUINT16* pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDDELETELIMITTEXT)(YNDUINT16 wIndex, YNDUINT16* pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDRESETLIMITTEXT)(YNDUINT16* pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDADDTABLELINE)(YNDUINT16 wRgnNo, YNDUINT16 wFlag, YNDUINT16 wPos, YNDUINT16* pwLineNo, YNDUINT16* pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDDELETETABLELINE)(YNDUINT16 wRgnNo, YNDUINT16 wLineNo, YNDUINT16 wFlag, YNDUINT16* pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDMERGECELL)(YNDUINT16 wRgnNo, YNDUINT16 wCellNo1, YNDUINT16 wCellNo2, YNDUINT16* pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDSPLITCELL)(YNDUINT16 wRgnNo, YNDUINT16 wCellNo, YNDUINT16* pwErrorCode);
typedef	HANDLE (YNDAPI*		YNDGETOCRHEAD)(YNDUINT16* pwErrorCode) ;
typedef	YNDRESULT (YNDAPI*	YNDRECOGEX)(YNDUINT16 wRgn, PRMINFO2 *pPrmInfo, LPYNDPROGRESS pProgress, YNDUINT16 *pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDADJUSTTARGETREGION)(PRMINFO *pPrmInfo, YNDUINT16 wCommand , YNDUINT16 *wErrCode) ;

// ���[�U����
typedef	YNDRESULT (YNDAPI*	YNDCREATEUSRDIC)(YNDLPCSTR lpszDicName, YNDUINT16 wDicType, YNDUINT16 *pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDCHECKUSRDIC)(YNDLPCSTR lpszDicName, YNDUINT16 wDicType, YNDUINT16 *pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDDELETEUSRDIC)(YNDLPCSTR lpszDicName, YNDUINT16 wDicType, YNDUINT16 *pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDLOADUSROCRDIC)(YNDLPCSTR lpszDicName, YNDUINT16 *pwErrorCode);
typedef	YNDUINT16 (YNDAPI*	YNDGETUSRTOTALCHAR)(YNDUINT16 *pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDGETUSRCHAR)(YNDUINT16 wNum, YNDUINT16 *pwLength, YNDUINT16 *pwChar, YNDUINT16 *pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDGETUSRCHARIMAGE)(YNDUINT16 wNum, unsigned char* lpImage, YNDUINT16 *pwWidth, YNDUINT16 *pwHeight, YNDUINT16 *pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDAPPENDUSRCHAR)(YNDUINT16 wLength, YNDUINT16 *pwChar, unsigned char* lpData, YNDUINT16 wWidth, YNDUINT16 wHeight, YNDUINT16 *pwNum, YNDUINT16 *pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDAPPENDUSRCHARRECT)(YNDUINT16 wLength, YNDUINT16 *pwChar, YNDRECT rect, YNDUINT16 *pwNum, YNDUINT16 *pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDDELETEUSRCHAR)(YNDUINT16 wNum, YNDUINT16 *pwErrorCode);
typedef	void (YNDAPI*		YNDUNLOADUSROCRDIC)();
typedef	YNDRESULT (YNDAPI*	YNDLOADUSRWRDDIC)(YNDLPCSTR lpszDicName, YNDUINT16 *pwErrorCode);
typedef	YNDUINT16 (YNDAPI*	YNDGETUSRTOTALWORD)(YNDUINT16 *pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDGETUSRWORD)(YNDUINT16 wNum, YNDLPSTR lpszWord, YNDUINT16 *pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDAPPENDUSRWORD)(YNDLPCSTR lpszWord, YNDUINT16 *pwNum, YNDUINT16 *pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDDELETEUSRWORD)(YNDUINT16 wNum, YNDUINT16 *pwErrorCode);
typedef	void (YNDAPI*		YNDUNLOADUSRWRDDIC)();

// �����ݒ�
typedef	YNDRESULT (YNDAPI*	YNDGETENV)(OCRENV *pocrenv, YNDUINT16 *pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDSETENV)(OCRENV ocrenv, YNDUINT16 *pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDGETENVEX)(OCRENV3 *pocrenv, YNDUINT16 *pwErrorCode); /* Ver.3 */
typedef	YNDRESULT (YNDAPI*	YNDSETENVEX)(OCRENV3 *pocrenv, YNDUINT16 *pwErrorCode); /* Ver.3 */

// �X�L���i����
typedef	YNDRESULT (YNDAPI*	YNDSCANIMAGE)(LPYNDPROGRESS pProgress, YNDUINT16 *pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDSELECTSOURCE)(YNDUINT16 *pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDSCANIMAGEADF)(YNDBOOL bTwainDlg, LPYNDPROGRESS pProgress, YNDUINT16 *pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDSUPPRESSSCANIMAGE)(SCANINFO stScanInfo, YNDBOOL* pbNextPage, LPYNDPROGRESS pProgress, YNDUINT16* pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDSUPPRESSSCANNEXT)(YNDBOOL* pbNextPage, LPYNDPROGRESS pProgress, YNDUINT16* pwErrorCode);
typedef	YNDRESULT (YNDAPI*	YNDSUPPRESSSCANEND)();
typedef	YNDRESULT (YNDAPI*	YNDISSUPPRESSSCANNER)(YNDLPSTR szScannerName, YNDUINT16* pwSize, YNDUINT16* pwErrorCode);
#elif MAC
typedef	YNDHANDLE (YNDAPI*		YNDGETOCRHEAD)(YNDUINT16* pwErrorCode) ;
#endif // _WIN32

#ifdef MAC
#pragma pack(pop)	// �A���C�����g�𕜋A����
#endif

#endif /* _OCRSYS_H */
