// The following ifdef block is the standard way of creating macros which make exporting 
// from a DLL simpler. All files within this DLL are compiled with the POCKETHTMLPRINT_EXPORTS
// symbol defined on the command line. this symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see 
// POCKETHTMLPRINT_API functions as being imported from a DLL, wheras this DLL sees symbols
// defined with this macro as being exported.
/*
#ifdef POCKETHTMLPRINT_EXPORTS
#define POCKETHTMLPRINT_API __declspec(dllexport)
#else
#define POCKETHTMLPRINT_API __declspec(dllimport)
#endif
*/

//Define ERROR values for HTML_ErrVal
#define errNoError			0
#define errUserCancel		1
#define errAbortOperation	2
#define errAbortPrint		3

//Error value
#ifdef POCKETHTMLPRINT_EXPORTS
#define POCKETHTMLPRINT_API __declspec(dllexport)
#else
#define POCKETHTMLPRINT_API __declspec(dllimport)
#endif
extern POCKETHTMLPRINT_API int HTML_ErrVal;
#undef POCKETHTMLPRINT_API


#ifdef POCKETHTMLPRINT_EXPORTS
	#define POCKETHTMLPRINT_API extern "C" __declspec(dllexport)
#else
//	#define POCKETHTMLPRINT_API __declspec(dllimport)
	#define POCKETHTMLPRINT_API extern "C" __declspec(dllimport)
	#ifdef __cplusplus
		#define PRCE_API 
//		#define PRCE_API __declspec(dllimport)
	#else
rrr		#define PRCE_API __declspec(dllimport)
	#endif
#endif

/*
//Define ERROR values for HTML_ErrVal
#define errNoError			0
#define errUserCancel		1
#define errAbortOperation	2
#define errAbortPrint		3

//Error value
extern POCKETHTMLPRINT_API int HTML_ErrVal;
*/

#define HTML_StartOptions	1
#define HTML_StartPrinter	2
POCKETHTMLPRINT_API BOOL HTMLpr_SetupAll(int HTML_Start);

POCKETHTMLPRINT_API BOOL HTMLpr_Startup2();
POCKETHTMLPRINT_API BOOL HTMLpr_Startup(HWND hwnd);
POCKETHTMLPRINT_API BOOL HTMLpr_Register(char* regcode);
POCKETHTMLPRINT_API int  HTMLpr_GetVersion();
POCKETHTMLPRINT_API BOOL HTMLpr_Close();
POCKETHTMLPRINT_API BOOL HTMLpr_SendStr(LPTSTR pstr,int scnt);
POCKETHTMLPRINT_API BOOL HTMLpr_SendAsciiStr(char* pstr,int scnt);
POCKETHTMLPRINT_API BOOL HTMLpr_SendFile(LPTSTR pfilename,BOOL UseUnicode);

#define PRINTSIZE_NORMAL		0
#define PRINTSIZE_SHRINKTOFIT	1
#define PRINTSIZE_CUSTOM		2

#define PAGERANGE_ALL			0
#define PAGERANGE_PAGES			1
POCKETHTMLPRINT_API void HTMLpr_SetupHTMLOptions(int PrintSizing,int CustomSize,int PrintRange,int PgFrom,int PgTo,int Copies,BOOL PrintHeader,BOOL ReduceTextSize);

// The following methods are clones of their PrinterCE SDK equivalents...
POCKETHTMLPRINT_API void HTMLpr_SetScaleMode(int scalemode);
POCKETHTMLPRINT_API BOOL HTMLpr_SetupPrinter(long Printer, long Port, long Baudrate);
POCKETHTMLPRINT_API BOOL HTMLpr_SetupPaper(long PaperSize, long Orientation, float PaperWidth, float PaperHeight, float LeftMgn, float TopMgn, float RightMgn, float BottomMgn);
POCKETHTMLPRINT_API BOOL HTMLpr_SetupPrinterOther(long FFSetting,float FFScroll,long Density,long Handshake,long BitFlags,long Compressed,long Dither,long DraftMode);
POCKETHTMLPRINT_API BOOL HTMLpr_SetupNetPath(LPTSTR NetString);

POCKETHTMLPRINT_API int HTMLpr_PrintJob(long KeepPrinterConnection);
POCKETHTMLPRINT_API void HTMLpr_Cancel();
POCKETHTMLPRINT_API void HTMLpr_CancelJob(long KeepPrinterConnection);
