#pragma once

interface Ilkf5glob;

#define MAX_LINESEP 20

class Protocol;

//#define LKFSERVER_LOG_MODE 1
#define LKFSERVER_LOG_FILENAME "c:\\log.txt"

class LKFStatic
{
	CRegKey   Reg;
	char	  CurrentRootPath[MAX_PATH];
	char	  LineSepImport[MAX_LINESEP];
	char	  LineSepExport[MAX_LINESEP];

	void *ProtocolSemaphore;
	Protocol *pProtocol;

public:
	LKFStatic(void);
	virtual ~LKFStatic(void);

	int Init ();
	static void EnterCS ();
	static void LeaveCS ();
	
	void SetRootPath (const char *);
	const char *GetRootPath (char *Path, ULONG *PathLen);
	const char *GetCurrentRootPath ();
	
	void SetLineSeparators (const char *import, const char *cexport);
	void GetCurrentLineSeparators (const char **import, const char **cexport);
	void GetLineSeparators (char *import, char *cexport);


};

LKFStatic *GetStaticObject ();

BSTR createBSTRLen (const char *s, unsigned int len);
BSTR createBSTR (const char *s);
char * createChar (const BSTR b_string);
char * createChar (const VARIANT variant);

