예제 #1
0
BOOL CSoftInfoQuery::Initialize(LPCWSTR pKSafePath)
{
	assert(pKSafePath != NULL && _pNotify != NULL);

	_ksafePath = pKSafePath; 
	trim_right(_ksafePath, L"\\"); 
	make_lower(_ksafePath);

	return InitCacheDB();
}
예제 #2
0
BOOL CSoftUninstall::Initialize(LPCWSTR pKSafePath)
{
	assert(pKSafePath != NULL && _pNotify != NULL);

	_ksafePath = pKSafePath; 
	trim_right(_ksafePath, L"\\"); 
	make_lower(_ksafePath);

	if(
		!filesystem_traits<wchar_t>::file_exists((_ksafePath + SOFT_UNINST_DAT).c_str()) ||
		!filesystem_traits<wchar_t>::file_exists((_ksafePath + SOFT_PINYIN_DAT).c_str()) ||
		!InitCacheDB() ||
		!_commTaskMgr.Startup()
		) 
		return FALSE;

	// 启动初始化任务
	return StartTask(new CSoftInitTask(this));
}