// eraser.h
#include <afxtempl.h>

struct SFileInfo
{
	~SFileInfo(){
		//OutputDebugString(_T("SFileInfo::~SFileInfo() !!!!!!!!!!!!!!!!!!!!!!!!!\n"));
	}
	CString m_sPath;
	HANDLE m_hProcess;
	bool auto_chekout;
};

class CEraser  
{
public:
	CEraser();
	virtual ~CEraser();

	static void CALLBACK OnTimer(HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime);

	void AddFileInfo(CString file,HANDLE process, bool auto_out=false);

protected:
	//static CArray <SFileInfo,SFileInfo&> m_info_array;
	static CaplTAggr <SFileInfo*,SFileInfo*,APLAGGR_LIST|APLAGGR_AUTOKILLREF> m_info_array;
	static long timer;
};