#if !defined(AFX_SERVICE_H__0778B821_D4C5_11D3_A1E7_00A024AAD7AF__INCLUDED_)
#define AFX_SERVICE_H__0778B821_D4C5_11D3_A1E7_00A024AAD7AF__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class tempAddInClass
{
public:
	tempAddInClass();
	virtual ~tempAddInClass();
	virtual tempAddInClass* UnLoadAddIn(int);
};

typedef struct _OSVERSIONINFOEXEX
{
		DWORD dwOSVersionInfoSize;
		DWORD dwMajorVersion;
		DWORD dwMinorVersion;
		DWORD dwBuildNumber;
		DWORD dwPlatformId;
		TCHAR szCSDVersion[128];
		WORD wServicePackMajor;
		WORD wServicePackMinor;
		WORD wSuiteMask;
		BYTE wProductType;
		BYTE wReserved;
} OSVERSIONINFOEXEX, *POSVERSIONINFOEXEX, *LPOSVERSIONINFOEXEX;

class CService : public CBLContext
{
	DECLARE_DYNCREATE(CService);
public:

	enum {
	methColorBrowse,
	methUnColorBrowse,
	methActiveContext,
	methCallAsProcedure,
	methCallAsFunction,
	methGetContextVar,
	methSetContextVar,
	methChooseValue,
	methAddGlobalModule,
	methDeleteGlobalModule,
	methShowKeyboardIndicator,
	methSetWallpaper,
	methHeightTableString,
	methHideTable,
	methGetTableNames,
	methGetGUID,
	methOSVersion,
	methIdleProcessing,
	methListMoxel,
	methUnLoadAddIn,
	methPlay,
	methGetPrintersList,
	methIsPrinterReady,
	methSetCursor,
	methSendKeys,
	methCreateFont,
	methDeleteFont,
	methCommandLine,
#ifndef FORMEX_DLL
	methLoadModule,
	methUnLoadModule,
#else
	methVersionFormEx,
#endif
	methVersion,
	methAsyncEvent,
	methMouseHook,
	methKeyHook,
	methCreateFontCausedBy,
	methValueListDraw,
	methAllFormsList,
	methOpenDockableForm,
	methOpenToolsForm,
	methGetUsersList,
	methTest,
	lastMethod
	};

	static struct paramdefs {
		char * Names[2];
		int HasReturnValue;
		int NumberOfParams;
	}  defFnNames[];
	
	CService();
	CService(int);
	virtual ~CService();
	virtual int  CallAsFunc(int,class CValue &,class CValue * *);
	virtual int  CallAsProc(int,class CValue * *);
	virtual void  DecrRef(void);
	virtual int  FindMethod(char const *)const;
	virtual int  FindProp(char const *)const;
	virtual char const *  GetCode(void)const;
	virtual int  GetDestroyUnRefd(void)const;
	virtual void  GetExactValue(class CValue &);
	virtual class CObjID   GetID(void)const;
	virtual class CBLContextInternalData *  GetInternalData(void);
	virtual char const *  GetMethodName(int,int)const;
	virtual int  GetNMethods(void)const;
	virtual int  GetNParams(int)const;
	virtual int  GetNProps(void)const;
	virtual int  GetParamDefValue(int,int,class CValue *)const;
	virtual char const *  GetPropName(int,int)const;
	virtual int  GetPropVal(int,class CValue &)const;
	virtual long  GetTypeID(void)const;
	virtual char const *  GetTypeString(void)const;
	virtual class CType   GetValueType(void)const;
	virtual int  HasRetVal(int)const;
	virtual void  IncrRef(void);
	virtual void  InitObject(class CType const &);
	virtual void  InitObject(char const *);
	virtual int  IsExactValue(void)const;
	virtual int  IsOleContext(void)const;
	virtual int  IsPropReadable(int)const;
	virtual int  IsPropWritable(int)const;
	virtual int  IsSerializable(void);
	virtual int  SaveToString(class CString &);
	virtual void  SelectByID(class CObjID,long);
	virtual int  SetPropVal(int,class CValue const &);
	static class CObjID ObjID;
};

class CTextOutputContext: public CBLContext
{
public:
	CBodyTextDoc* m_pBodyTextDoc;
};

#endif // !defined(AFX_SERVICE_H__0778B821_D4C5_11D3_A1E7_00A024AAD7AF__INCLUDED_)
