// Controller.h : Declaration of the CController

#pragma once
#include "resource.h"       // main symbols


// IController
[
	object,
	uuid("77E30ADF-62DF-420B-A3A7-D74D310C0DAE"),
	dual,	helpstring("IController Interface"),
	pointer_default(unique)
]
__interface IController : IDispatch
{
	[propget, id(2), helpstring("property RootPath")] HRESULT RootPath([out, retval] BSTR* pVal);
	[propput, id(2), helpstring("property RootPath")] HRESULT RootPath([in] BSTR newVal);
	[propget, id(3), helpstring("property CurrentRootPath")] HRESULT CurrentRootPath([out, retval] BSTR* pVal);
	[propget, id(4), helpstring("property ExportSeparator")] HRESULT ExportSeparator([out, retval] BSTR* pVal);
	[propput, id(4), helpstring("property ExportSeparator")] HRESULT ExportSeparator([in] BSTR newVal);
	[propget, id(5), helpstring("property ImportSeparator")] HRESULT ImportSeparator([out, retval] BSTR* pVal);
	[propput, id(5), helpstring("property ImportSeparator")] HRESULT ImportSeparator([in] BSTR newVal);
	[propget, id(6), helpstring("property CurrentImportSeperator")] HRESULT CurrentImportSeperator([out, retval] BSTR* pVal);
	[propget, id(7), helpstring("property CurrentExportSeparator")] HRESULT CurrentExportSeparator([out, retval] BSTR* pVal);
	[propget, id(8), helpstring("property Version")] HRESULT Version([out, retval] BSTR* pVal);
	[propget, id(9), helpstring("property FirstYear")] HRESULT FirstYear([out, retval] LONG* pVal);
	[propget, id(10), helpstring("property YearLatest")] HRESULT YearLatest([out, retval] LONG* pVal);
};

class LKFStatic;


// CController

[
	coclass,
	threading("apartment"),
	vi_progid("LKFServer.Controller"),
	progid("LKFServer.Controller.1"),
	version(1.0),
	uuid("751E02EC-81D8-4705-8860-1D5376983DD5"),
	helpstring("Controller Class")
]
class ATL_NO_VTABLE CController : 
	public IController
{
protected:
	LKFStatic *pLKFStatic;
	CRegKey   *pRegKey;
public:
	CController();
	virtual ~CController ();

	DECLARE_PROTECT_FINAL_CONSTRUCT()

	HRESULT FinalConstruct()
	{
		return S_OK;
	}
	
	void FinalRelease() 
	{
	}


public:

	STDMETHOD(get_RootPath)(BSTR* pVal);
	STDMETHOD(put_RootPath)(BSTR newVal);
	STDMETHOD(get_CurrentRootPath)(BSTR* pVal);
	STDMETHOD(get_ExportSeparator)(BSTR* pVal);
	STDMETHOD(put_ExportSeparator)(BSTR newVal);
	STDMETHOD(get_ImportSeparator)(BSTR* pVal);
	STDMETHOD(put_ImportSeparator)(BSTR newVal);
	STDMETHOD(get_CurrentImportSeperator)(BSTR* pVal);
	STDMETHOD(get_CurrentExportSeparator)(BSTR* pVal);
	STDMETHOD(get_Version)(BSTR* pVal);
	STDMETHOD(get_FirstYear)(LONG* pVal);
	STDMETHOD(get_YearLatest)(LONG* pVal);
};

