// lkf5.h : Declaration of the Clkf5

#ifndef __LKF5_H_
#define __LKF5_H_

#include "resource.h"       // main symbols

typedef struct LKF_CONTEXT LKF_CONTEXT;

/////////////////////////////////////////////////////////////////////////////
// Clkf5

class ATL_NO_VTABLE Clkf5 : 
	public CComObjectRootEx<CComSingleThreadModel>,
	public CComCoClass<Clkf5, &CLSID_lkf5>,
	public IDispatchImpl<Ilkf5, &IID_Ilkf5, &LIBID_LKFKDOCLib>
{

	LKF_CONTEXT *ctx;
	void **pointerArray;
	unsigned int pointerArrayAlloc;
	unsigned int pointerArrayCount;

	unsigned int CreateUIntArray (VARIANT var, unsigned int *&array);
	void FreeUIntArray (unsigned int *&array);

	long PointerToLong (void *ptr);
	void *LongToPointer (long l);

public:
	Clkf5();
	~Clkf5();

DECLARE_REGISTRY_RESOURCEID(IDR_LKF5)

DECLARE_PROTECT_FINAL_CONSTRUCT()

BEGIN_COM_MAP(Clkf5)
	COM_INTERFACE_ENTRY(Ilkf5)
	COM_INTERFACE_ENTRY(IDispatch)
END_COM_MAP()

// Ilkf5
public:
	STDMETHOD(lkf_set_npplaus_tracefilename)(BSTR outputfilename);
	STDMETHOD(lkf_write_meldediagfile)(BSTR filename, long kanr, /*[out]*/ BSTR *error, /*[out, retval]*/ long * returncode);
	STDMETHOD(lkf_plaus_GetMeldeDiagAnz)(long aufenthalt, /*[out,retval]*/ long *count);
	STDMETHOD(lkf_auf_getmeldediag)(long meldediag, /*[out]*/ long *index, /*[out,retval]*/ long *code);
	STDMETHOD(lkf_auf_nextmeldediag)(long meldediag, /*[out, retval]*/ long *nextmeldediag);
	STDMETHOD(lkf_auf_firstmeldediag)(long aufenthalt, /*[out, retval]*/ long *meldediag);
	STDMETHOD(lkf_plaus_meldediag_text)(long nr, /*[out, retval]*/ BSTR *text);
	STDMETHOD(lkf_plaus_meldediag_typ)(long nr, /*[out, retval]*/ BSTR *typ);
	STDMETHOD(lkf_context_GetMeldeDiagAnz)(long kanr, /*[out, retval]*/ long *meldediagcount);
	STDMETHOD(lkf_auf_get_mel3)(long aufenthalt, long index, /*[out]*/ BSTR *mel, /*[out]*/ BSTR *melanz, /*[out]*/ BSTR *meldat, /*[out]*/ BSTR *melpos, /*[out,retval]*/ long *returncode);
	STDMETHOD(lkf_add_mel3)(long aufenthalt, BSTR mel, BSTR melanz, BSTR meldat, BSTR melpos, /*[out, retval]*/ long *ret);
	STDMETHOD(lkf_auf_get_min_subgruppe)(long aufenthalt, /*[out, retval]*/ long *gruppe);
	STDMETHOD(lkf_auf_get_diag2)(long aufenthalt, long index, /*[out]*/ BSTR *diag, /*[out]*/ BSTR *diagtype,/*[out]*/ BSTR *diagpos, /*[out,retval]*/ long *returncode);
	STDMETHOD(lkf_auf_get_mel2)(long aufenthalt, long index, /*[out]*/ BSTR *mel, /*[out]*/ BSTR *melanz, /*[out]*/ BSTR *meldat, /*[out,retval]*/ long *returncode);
	STDMETHOD(lkf_add_diag2)(long aufenthalt, BSTR diag, BSTR diagtype, BSTR diagpos, /*[out, retval]*/ long *returncode);
	STDMETHOD(lkf_auf_get_subgruppe_diag)(long aufenthalt, long index, /*[out, retval]*/ BSTR *diag);
	STDMETHOD(lkf_auf_get_abtbd)(long aufenthalt, long index, /*[out]*/ long *abtbd, /*[out,retval]*/ long *returncode);
	STDMETHOD(lkf_add_mel2)(long aufenthalt, BSTR mel, BSTR melanz, BSTR meldat, /*[out,retval]*/ long *ret);
	STDMETHOD(lkf_context_warningcode_count)(long ka, long code, /*[out,retval]*/ long *count);
	STDMETHOD(lkf_context_errorcode_count)(long ka, long code, /*[out,retval]*/ long *count);
	STDMETHOD(lkf_get_warningcode_minmax)(/*[out]*/ long *pmin, /*[out]*/ long *pmax);
	STDMETHOD(lkf_get_errorcode_minmax)(/*[out]*/ long *pmin, /*[out]*/ long *pmax);
	STDMETHOD(lkf_add_kost)(long aufenthalt, BSTR kost, /*[out,retval]*/ long *returncode);
	STDMETHOD(lkf_auf_get_opt_percentage)(long aufenthalt, /*[out,retval]*/ double *percentage);
	STDMETHOD(lkf_auf_get_opt_subgruppe)(long aufenthalt, /*[out,retval]*/ long *gruppe);
	STDMETHOD(lkf_auf_is_optimizable)(long aufenthalt, /*[out,retval]*/ long *erg);
	STDMETHOD(lkf_get_context_ka_optimized)(long ka, /*[out]*/ long *anz, /*[out]*/ long *opt, /*[out]*/ double *maxpkt, /*[out]*/ double *actpkt, /*[out,retval]*/ double *percentage);
	STDMETHOD(lkf_get_context_ka_abtstat)(long ka, long abtnr, /*[out]*/ long *anz, /*[out]*/ long *bd, /*[out]*/ long *err, /*[out,retval]*/ BSTR *abtfc);
	STDMETHOD(lkf_get_context_ka_abtanz)(long ka, /*[out,retval]*/ long *returncode);
	STDMETHOD(lkf_add_ka_stats)(long aufenthalt, long modus, /*[out,retval]*/ long *returncode);
	STDMETHOD(lkf_reset_ka)(/*[out, retval]*/ long *returncode);
	STDMETHOD(lkf_auf_line_svnr)(long aufenthalt, /*[out,retval]*/ BSTR *line);
	STDMETHOD(lkf_auf_get_field)(long aufenthalt, long fieldnum, /*[out,retval]*/ BSTR *fieldvalue);
	STDMETHOD(lkf_set_modelljahr)(long modelljahr, BSTR input_path, /*[out]*/ BSTR *errorstring, /*[out,retval]*/ long *returncode);
	STDMETHOD(lkf_auf_getline)(long aufenthalt, long index, /*[out,retval]*/ BSTR *line);
	STDMETHOD(lkf_auf_getlineanz)(long aufenthalt, /*[out, retval]*/ long *lineanz);
	STDMETHOD(lkf_copy_aufenthalt)(long aufenthalt, /*[out, retval]*/ long *neuer_aufenthalt);
	STDMETHOD(lkf_auf_get_diag)(long aufenthalt, long index, /*[out]*/ BSTR *diag, /*[out]*/ BSTR *diagtype, /*[out,retval]*/ long *returncode);
	STDMETHOD(lkf_auf_get_abt)(long aufenthalt, long index, /*[out]*/ BSTR *abtfc, /*[out]*/ BSTR *abtdat, /*[out]*/ BSTR *abtpos, /*[out,retval]*/ long *returncode);
	STDMETHOD(lkf_auf_get_mel)(long aufenthalt, long index, /*[out]*/ BSTR *mel, /*[out]*/ BSTR *melanz, /*[out,retval]*/ long *returncode);
	STDMETHOD(lkf_auf_line_scoring)(long aufenthalt, /*[out,retval]*/ BSTR *line);
	STDMETHOD(lkf_auf_line_mel)(long aufenthalt, long i, /*[out,retval]*/ BSTR *line);
	STDMETHOD(lkf_auf_line_kommentar)(long aufenthalt, long i, /*[out,retval]*/ BSTR *line);
	STDMETHOD(lkf_auf_line_akwarn)(long aufenthalt, long i, /*[out,retval]*/ BSTR *line);
	STDMETHOD(lkf_auf_line_kost)(long aufenthalt, long i, /*[out,retval]*/ BSTR *line);
	STDMETHOD(lkf_auf_line_diag)(long aufenthalt, long i, /*[out,retval]*/ BSTR *line);
	STDMETHOD(lkf_auf_line_abt)(long aufenthalt, long i, /*[out,retval]*/ BSTR *line);
	STDMETHOD(lkf_auf_get_kommentaranz)(long aufenthalt, /*[out,retval]*/ long *anzahl);
	STDMETHOD(lkf_auf_get_akwarnanz)(long aufenthalt, /*[out,retval]*/ long *anzahl);
	STDMETHOD(lkf_auf_get_kostanz)(long aufenthalt, /*[out,retval]*/ long *anzahl);
	STDMETHOD(lkf_auf_get_diaganz)(long aufenthalt, /*[out,retval]*/ long *anzahl);
	STDMETHOD(lkf_auf_get_melanz)(long aufenthalt, /*[out,retval]*/ long *anzahl);
	STDMETHOD(lkf_auf_get_abtanz)(long aufenthalt, /*[out,retval]*/ long *anzahl);
	STDMETHOD(lkf_auf_line_root)(long aufenthalt, /*[out,retval]*/ BSTR *rootline);
	STDMETHOD(lkf_auf_get_subgruppe_mel)(long aufenthalt, long index, /*[out, retval]*/ BSTR *mel);
	STDMETHOD(lkf_auf_get_gruppe_mel)(long aufenthalt, /*[out, retval]*/ BSTR *mel);
	STDMETHOD(lkf_plaus_GetWarningText)(long aufenthalt, long error, /*[out, retval]*/ BSTR *text);
	STDMETHOD(lkf_plaus_GetErrorText)(long aufenthalt, long error, /*[out,retval]*/ BSTR *text);
	STDMETHOD(lkf_plaus_GetWarningText4)(long aufenthalt, long error, /*[out]*/ BSTR *text, /*[out]*/ BSTR *field, /*[out,retval]*/ long *returncode);
	STDMETHOD(lkf_plaus_GetErrorText4)(long aufenthalt, long error, /*[out]*/ BSTR *text, /*[out]*/ BSTR *field, /*[out,retval]*/ long *returncode);
	STDMETHOD(lkf_auf_reset_diag)(long aufenthalt);
	STDMETHOD(lkf_auf_reset_mel)(long aufenthalt);
	STDMETHOD(lkf_auf_reset_abt)(long aufenthalt);
	STDMETHOD(lkf_get_context_ka)(long i, /*[out]*/ long *aufanz, /*[out ,retval]*/ BSTR *kanr);
	STDMETHOD(lkf_get_context_ka_anz)(/*[out, retval]*/ long *anz);
	STDMETHOD(lkf_compose_filename)(BSTR ka, BSTR type, /*[out, retval]*/ BSTR *filename);
	STDMETHOD(lkf_write_file)(BSTR filename, long kanr, long flags, /*[out]*/ BSTR *error, /*[out, retval]*/ long *returncode);
	STDMETHOD(lkf_write_errorfile)(BSTR filename, long kanr, long flags, BSTR inputfile, BSTR outputfile, /*[out]*/ BSTR *error, /*[out,retval]*/ long *returncode);
	STDMETHOD(lkf_get_aufenthalt_anz)(/*[out, retval]*/ long *anz);
	STDMETHOD(lkf_get_aufenthalt)(long index, /*[out, retval]*/ long *aufenthalt);
	STDMETHOD(lkf_reset_aufenthalte)();
	STDMETHOD(lkf_reset_aufenthalt_package)();

	STDMETHOD(lkf_auf_get_subgruppe_scorvalue)(long aufenthalt, long index, long field, /*[out,retval]*/ long *scorvalue);
	STDMETHOD(lkf_auf_get_subgruppe_gruppe)(long aufenthalt, long index, /*[out]*/ BSTR *knoten, /*[out, retval]*/ BSTR *gruppe);
	STDMETHOD(lkf_auf_get_gruppe)(long aufenthalt, /*[out]*/ BSTR *knoten, /*[out, retval]*/ BSTR *gruppe);
	STDMETHOD(lkf_auf_get_scorvalue)(long aufenthalt, long field, /*[out, retval]*/ long *scorvalue);
	STDMETHOD(lkf_auf_get_subgruppenanz)(long aufenthalt, /*[out, retval]*/ long *anz);
	STDMETHOD(lkf_auf_get_maxsubgruppe)(long aufenthalt, /*[out, retval]*/ long *subgruppe);
	STDMETHOD(lkf_auf_getwarningcode)(long warning, /*[out]*/ long *index, /*[out, retval]*/ long *code);
	STDMETHOD(lkf_auf_geterrorcode)(long error, /*[out]*/ long *index, /*[out, retval]*/ long *code);
	STDMETHOD(lkf_auf_nextwarning)(long warning, /*[out, retval]*/ long *nextwarning);
	STDMETHOD(lkf_auf_firstwarning)(long aufenthalt, /*[out, retval]*/ long *firstwarning);
	STDMETHOD(lkf_auf_nexterror)(long error, /*[out, retval]*/ long *nexterror);
	STDMETHOD(lkf_auf_firsterror)(long aufenthalt, /*[out, retval]*/ long *firsterror);
	STDMETHOD(lkf_add_line_auf)(long aufenthalt, BSTR line, /*[out, retval]*/ long *ret);
	STDMETHOD(lkf_add_komm)(long aufenthalt, BSTR komm, /*[out, retval]*/ long *index);
	STDMETHOD(lkf_add_akwarn)(long aufenthalt, BSTR tcode, BSTR value, BSTR komm, /*[out, retval]*/ long *index);
	STDMETHOD(lkf_add_mel)(long aufenthalt, BSTR mel, BSTR melanz, /*[out, retval]*/ long *index);
	STDMETHOD(lkf_add_diag)(long aufenthalt, BSTR diag, BSTR diagtype, /*[out, retval]*/ long *returncode);
	STDMETHOD(lkf_add_abt)(long aufenthalt, BSTR abtfc, BSTR abtdat, BSTR abtpos, /*[out, retval]*/ long *index);
	STDMETHOD(lkf_reset_aufenthalt)(long aufenthalt);
	STDMETHOD(lkf_free_aufenthalt)(long aufenthalt);
	STDMETHOD(lkf_alloc_aufenthalt)(/*[out, retval]*/ long *aufenthalt);
	STDMETHOD(lkf_scoring)(long aufenthalt, /*[out, retval]*/ long *returncode);
	STDMETHOD(lkf_plaus_WarningCode2Text)(long nr, /*[out, retval]*/ BSTR *text);
	STDMETHOD(lkf_plaus_WarningCode2Massnahme)(long nr, /*[out, retval]*/ long *massnahme);
	STDMETHOD(lkf_plaus_ErrorCode2Text)(long nr, /*[out, retval]*/ BSTR *text);
	STDMETHOD(lkf_plaus_GetWarningAnz)(long aufenthalt, /*[out]*/ long *accepted, /*[out, retval]*/ long *warninganz);
	STDMETHOD(lkf_plaus_GetErrorAnz)(long aufenthalt, /*[out]*/ long *accepted, /*[out, retval]*/ long *returncode);
	STDMETHOD(lkf_plaus)(long aufenthalt, /*[out, retval]*/ long *returncode);
	STDMETHOD(lkf_read_flat_inputfile)(BSTR inputfile, /*[out]*/ BSTR *error, /*[out, retval]*/ long *returncode);
	STDMETHOD(lkf_context_GetWarningAnz)(long kanr, /*[out]*/ long *accepted, /*[out, retval]*/ long *warninganz);
	STDMETHOD(lkf_context_GetErrorAnz)(long kanr, /*[out]*/ long *accepted, /*[out, retval]*/ long *erroranz);
	STDMETHOD(lkf_get_context_scorvalue)(long kanr, long fieldnumber, /*[out, retval]*/ double *value);
	STDMETHOD(lkf_set_contextparameters)(long cmb_jahr, long period_val, long lfdnr, long type, long flags);
	STDMETHOD(lkf_read_inputfile)(BSTR inputfile, /*[out]*/ BSTR *error, /*[out, retval]*/ long *returncode);
	STDMETHOD(lkf_add_line)(BSTR line, /*[out, retval]*/ long *returncode);
	STDMETHOD(lkf_insert_aufenthalt)(long aufenthalt, /*[out, retval]*/ long *index);
	STDMETHOD(lkf_alloc_context)(long modelljahr, BSTR path, /*[out]*/ BSTR *error, /*[out, retval]*/ long *context);
	STDMETHOD(lkf_auf_getintlineanz)(LONG aufenthalt, LONG* count);
	STDMETHOD(lkf_auf_getintline)(LONG aufenthalt, LONG index, BSTR* line);
	STDMETHOD(lkf_getaddline)(LONG index, BSTR* line);
	STDMETHOD(lkf_check)(LONG modus, LONG* returncode);
	STDMETHOD(lkf_getSatzartErrorCount)(LONG* count);
	STDMETHOD(lkf_getSatzartError)(LONG index, BSTR* line);
	STDMETHOD(lkf_getSatzartErrorHeadline)(LONG Facility, BSTR* line);
	STDMETHOD(lkf_set_compatibilitymode)(LONG compatibility);
	STDMETHOD(lkf_setErrorFormat)(LONG Facility, VARIANT FieldNums, LONG* ReturnCode);
	STDMETHOD(lkf_setErrorFilter)(LONG Filter, LONG* ErrorCount);
	STDMETHOD(lkf_setErrorCountsFilter)(LONG Filter, LONG* ErrorCount);
	STDMETHOD(lkf_int_scoring)(LONG* ReturnCode);
	STDMETHOD(lkf_setIntAbtData)(BSTR ABTFC, LONG BettenAnzahl, LONG* ReturnCode);
	STDMETHOD(lkf_getaddlineanz)(LONG* Count);
	STDMETHOD(lkf_int_getAbtAnz)(LONG* AbtAnz);
	STDMETHOD(lkf_int_getAnalyseHeadline)(BSTR* Line);
	STDMETHOD(lkf_int_getAnalyseData)(LONG AbtNr, LONG Monat, BSTR* Line);
	STDMETHOD(lkf_int_getAbtHeadline)(BSTR* Line);
	STDMETHOD(lkf_int_getAbtData)(LONG AbtNr, BSTR* Line);
	STDMETHOD(lkf_int_getIntAufenthaltCount)(LONG* Count);
	STDMETHOD(lkf_int_getIntAufenthaltTISSCount)(LONG AufNr, LONG* Count);
	STDMETHOD(lkf_int_getIntAufenthaltDetailsHeadline)(BSTR* Line);
	STDMETHOD(lkf_int_getIntAufenthaltDetails)(LONG AufNr, BSTR* Line);
	STDMETHOD(lkf_int_getIntAufenthaltTRISSCount)(LONG lIntAuf, LONG* Count);
	STDMETHOD(lkf_int_getIntAufenthaltSAPSCount)(LONG lIntAuf, LONG* Count);
	STDMETHOD(lkf_int_getIntAufenthaltDetailsLine)(LONG lIntAuf, LONG lSatzartNr, LONG lNr, BSTR* Line);
	STDMETHOD(lkf_int_getIntAufenthaltDetailsField)(LONG lIntAuf, LONG lSatzartNr, LONG lNr, LONG lFieldNr, BSTR* Value);
	STDMETHOD(lkf_context_scoring)(LONG AufenthaltCount, LONG* returncode);
	STDMETHOD(lkf_context_plaus)(LONG AufenthaltCount, LONG* returncode);
	STDMETHOD(lkf_context_plaus_package)(LONG IsFirstPackage, LONG* returncode);
	STDMETHOD(lkf_setIntAbtDataIndex)(LONG AbtIndex, LONG Bettenanzahl, LONG* ReturnCode);
	STDMETHOD(lkf_int_getAbtFC)(LONG AbtIndex, BSTR* ABTFC);
	STDMETHOD(lkf_set_abrechnungsjahr)(LONG Abrechnungsjahr);
	STDMETHOD(lkf_set_contextflags)(LONG Flags);
	STDMETHOD(lkf_int_setintcontextparameters)(BSTR VonDatum, BSTR BisDatum, LONG Flags, LONG MaxStunden, LONG* Result);
	STDMETHOD(lkf_int_getIntAufenthaltSAPSField)(LONG AufNr, LONG SAPSNr, LONG FieldNr, BSTR* Field);
	STDMETHOD(lkf_int_getIntAufenthaltTISSField)(LONG AufNr, LONG TISSNr, LONG FieldNr, BSTR* Field);
	STDMETHOD(lkf_int_getIntAufenthaltTRISSField)(LONG AufNr, LONG TRISSNr, LONG FieldNr, BSTR* Field);
	STDMETHOD(lkf_int_getIntAufenthaltSAPSDetails)(LONG AufNr, LONG SAPSNr, BSTR* Line);
	STDMETHOD(lkf_int_getIntAufenthaltTISSDetails)(LONG AufNr, LONG TISSNr, BSTR* Line);
	STDMETHOD(lkf_int_getIntAufenthaltTRISSDetails)(LONG AufNr, LONG TRISSNr, BSTR* Line);
	STDMETHOD(lkf_stat)(LONG Flags, LONG* Result);
	STDMETHOD(lkf_stat_getLineCount)(LONG StatType, LONG* LineCount);
	STDMETHOD(lkf_stat_getHeadline)(LONG StatType, BSTR* Line);
	STDMETHOD(lkf_stat_getLine)(LONG StatType, LONG LineNr, BSTR* Line);
	STDMETHOD(lkf_stat_getFieldByPosition)(LONG StatType, LONG LineNr, LONG FieldPos, BSTR* FieldValue);
	STDMETHOD(lkf_stat_getField)(LONG StatType, LONG LineNr, LONG FieldId, BSTR* FieldValue);
	STDMETHOD(lkf_stat_getFieldCount)(LONG StatType, LONG* ColumnCount);
	STDMETHOD(lkf_stat_getFieldHeadlineByPosition)(LONG StatType, LONG FieldPosition, BSTR* Headline);
	STDMETHOD(lkf_stat_getFieldHeadline)(LONG StatType, LONG FieldId, BSTR* Headline);
	STDMETHOD(lkf_stat_getLineByLineInfo)(LONG StatType, BSTR Info, LONG * LineNr);
	STDMETHOD(lkf_getSatzartErrorFieldHeadline)(LONG FieldNumber, BSTR* FieldHeadline);
	STDMETHOD(lkf_getSatzartErrorField)(LONG ErrorIndex, LONG FieldNumber, BSTR* FieldValue);
	STDMETHOD(lkf_getSatzartErrorSum_Count)(LONG* Count);
	STDMETHOD(lkf_getSatzartErrorSum_CodeToId)(BSTR ErrorCode, LONG* ErrorId);
	STDMETHOD(lkf_getSatzartErrorSum_Field)(LONG ErrorId, LONG FieldNr, BSTR* ErrorText);
	STDMETHOD(lkf_context_getAllErrorCount)(LONG* Count);
	STDMETHOD(lkf_context_getAllErrorInfo_CodeToId)(BSTR ErrorCode, LONG* ErrorId);
	STDMETHOD(lkf_context_getAllErrorInfo)(LONG ErrorId, LONG FieldNr, BSTR* ErrorText);
	STDMETHOD(lkf_convertMBDSErrorCode)(LONG OldCode, BSTR* NewCode);
	STDMETHOD(lkf_convertMBDSWarningCode)(LONG OldCode, BSTR* NewCode);
	STDMETHOD(lkf_npplaus_getProtokollHeadline)(BSTR* Line);
	STDMETHOD(lkf_npplaus_getWarningLineCount)(LONG* Count);
	STDMETHOD(lkf_npplaus_getProtokollLineCount)(LONG* Count);
	STDMETHOD(lkf_npplaus_getWarningLine)(LONG LineNr, BSTR* Line);
	STDMETHOD(lkf_npplaus_getProtokollLine)(LONG LineNr, BSTR* Line);
	STDMETHOD(lkf_npplaus_sum_headline)(BSTR* Line);
	STDMETHOD(lkf_npplaus_sum_abtcount)(LONG* AbtCount);
	STDMETHOD(lkf_npplaus_sum_abtline)(LONG AbtIndex, BSTR* Line);
	STDMETHOD(lkf_npplaus_getReasonCount)(LONG WarningNr, LONG* ReasonCount);
	STDMETHOD(lkf_npplaus_getReasonLine)(LONG WarningNr, LONG ReasonNr, BSTR* Line);
	STDMETHOD(lkf_npplaus_getInfoLine)(LONG WarningNr, BSTR* Line);
	STDMETHOD(lkf_npplaus_tfsum_headline)(BSTR* Headline);
	STDMETHOD(lkf_npplaus_critsum_headline)(BSTR* Headline);
	STDMETHOD(lkf_npplaus_tfsum)(LONG AbtIndex, BSTR* Line);
	STDMETHOD(lkf_npplaus_critsum)(LONG AbtIndex, BSTR* Line);
	STDMETHOD(lkf_auf_getErrorLine)(LONG Aufenthalt, LONG Err, BSTR* ErrorLine);
	STDMETHOD(lkf_auf_getWarningLine)(LONG Aufenthalt, LONG warn, BSTR* WarningLine);
	STDMETHOD(lkf_auf_getInfoLine)(LONG Aufenthalt, LONG warn, BSTR* WarningLine);
	STDMETHOD(lkf_trace_setLevel)(LONG Facility, LONG TraceLevel);
	STDMETHOD(lkf_trace_getLineCount)(LONG* LineCount);
	STDMETHOD(lkf_trace_getLine)(LONG LineNr, BSTR* Line);
	STDMETHOD(lkf_trace_getLevel)(LONG Facility, LONG* DebugLevel);
	STDMETHOD(lkf_trace_getAufenthalt)(BSTR* Aufenthaltszahl);
	STDMETHOD(lkf_set_debug_trace)(void);
	STDMETHOD(lkf_trace_setAufenthalt)(BSTR Aufenthaltszahl);
	STDMETHOD(lkf_context_get_errortext)(BSTR* Error);
	STDMETHOD(lkf_auf_line_akwarn2)(long aufenthalt, long i, LONG* HitCount, /*[out,retval]*/ BSTR *line);
	STDMETHOD(lkf_context_GetHinweisAnz)(long kanr, /*[out]*/ long *accepted, /*[out, retval]*/ long *erroranz);
	STDMETHOD(lkf_auf_nextinfo)(long warning, /*[out, retval]*/ long *nextwarning);
	STDMETHOD(lkf_auf_firstinfo)(long aufenthalt, /*[out, retval]*/ long *firstwarning);
	STDMETHOD(lkf_plaus_GetInfoAnz)(long aufenthalt, /*[out]*/ long *accepted, /*[out, retval]*/ long *warninganz);
	STDMETHOD(lkf_context_GetGlobalInfo)(long type, long *info);
	STDMETHOD(lkf_auf_get_abtfield)(long aufenthalt, long index,  long fieldnum, /*[out,retval]*/ BSTR *fieldvalue);
	STDMETHOD(lkf_context_read_dat)(BSTR fileName, /* [out,retval] */ LONG* numberOfLines);
	STDMETHOD(lkf_context_dat_line)(LONG lineIndex, /* [out,retval] */ BSTR *line);
	STDMETHOD(lkf_context_free_dat)();
	STDMETHOD(lkf_context_getSatzartErrorAnz) (LONG flags, /* [out,retval] */ LONG* numberOfErrors);
	STDMETHOD(lkf_auf_get_abtscor100) (long Aufenthalt, long abtIndex, /*[out]*/ BSTR *abtpos, /*[out]*/ long *tp100, /*[out]*/ long *lp100, /*[out,retval]*/ long *p100);
	STDMETHOD(lkf_auf_get_abtscor) (long Aufenthalt, long abtIndex, /*[out]*/ BSTR *abtpos, /*[out]*/ double *tp, /*[out]*/ double *lp, /*[out,retval]*/ double *p);
	STDMETHOD(lkf_stat_package) (/* [out,retval] */ long *ret);
	STDMETHOD(lkf_check_nombds) (/* [out,retval] */ long *ret);
	STDMETHOD(lkf_get_amb_counter) (long counterIndex, /*[out,retval]*/ long *value);
	STDMETHOD(lkf_auf_get_melIndexForPos) (long Aufenthalt, BSTR melpos, /* [out,retval] */ long *value);
	STDMETHOD(lkf_auf_get_mel_field) (long Aufenthalt, long melIndex, long melFieldIndex, /* [out,retval] */ long *value);
	STDMETHOD(lkf_auf_get_mel_value) (long Aufenthalt, long melIndex, long melFieldIndex, /* [out,retval] */ BSTR *value);
	STDMETHOD(lkf_context_set_modelparameter)(long parameterIndex, BSTR parameterValue, /* [out, retval] */ long *retVal);
	STDMETHOD(lkf_get_amb_kostenstelle_count)(/* [out, retval] */ long *value);
	STDMETHOD(lkf_get_amb_kostenstelle_value)(long index, long ambIndex, /* [out, retval] */ long *value);
	STDMETHOD(lkf_get_amb_kostenstelle_stringvalue)(long index, long ambIndex, /* [out, retval] */ BSTR *value);
	STDMETHOD(lkf_get_amb_kostenstelle_counter)(BSTR kostenstelle, long ambIndex, /* [out, retval] */ long *value);
	STDMETHOD(lkf_get_amb_kostenstelle_index)(BSTR kostenstelle, /* [out, retval] */ long *value);
	STDMETHOD(lkf_add_mel6)(long aufenthalt, BSTR mel, BSTR melanz, BSTR meldat, BSTR melpos, BSTR melzeit, BSTR seite, BSTR fcleist, BSTR kaleist, BSTR addinfo, /*[out,retval]*/ long *ret);


};

#endif //__LKF5_H_
