int main(int argc, char* argv[]) { int hr=0; CMain mainApp; g_pApp = &mainApp; hr = mainApp.Create(); if(LC_FAILED(hr)) return LC_OK; hr = mainApp.Run(NULL); return hr; }
void* CLAStart(void *pArg) { int nRet = 0; CGlobal *cGlob = NULL; CModule::ST_MODULE_OPTIONS stOption = *static_cast<CModule::ST_MODULE_OPTIONS*>(pArg); cGlob = CGlobal::GetInstance(); cGlob->SetModuleOption(&stOption); nRet = g_cMain.Init(stOption.m_pclsDB, stOption.m_szCfgFile); if(nRet == CLA_NOK){ CLA_LOG(CLA_ERR,false,"Init failed(nRet=%d)\n",nRet); return NULL; } g_cMain.Run(); return NULL; }