#include "stdafx.h"
#include "MainApp.h"
#include "RegegitKey.h"
#include "utils.h"

CMainApp::CMainApp(void)
{
}


CMainApp::~CMainApp(void)
{
}

void CMainApp::init()
{
	
}

BOOL CMainApp::start()
{
	LPBYTE value = new BYTE[512];
	DWORD dataLength = 256;
	if (!CRegegitKey::read_app_key(APP_PATH, value, &dataLength)) {
		MessageBox(NULL, _T("¶ÁÈ¡×¢²á±íÊ§°Ü"),_T("´íÎóÌáÊ¾"),MB_OK);
		return TRUE;
	}

	CString imagePath;
	LpbyteToCString(value, imagePath, dataLength);
	//imagePath.Append(IMAGE_PATH_SUBSTREET);
	DEBUG_OUTW(imagePath.GetString());
	BOOL ret = mFiles.list_files(imagePath.GetString());

	safe_delete(value);
	return ret;
}

CString& CMainApp::getPath()
{
	return mFiles.getPath();
}

void CMainApp::stop()
{

}