//----------------------------------------------------------------------------------- // Purpose : // Return : //----------------------------------------------------------------------------------- int CNtlServerApp::Create(int argc, _TCHAR* argv[], const char * lpszConfigFile /* = NULL */) { int rc = 0; SetConfigFileName(argv[0], lpszConfigFile); rc = CNtlServerApp::OnConfiguration( m_strConfigFile.c_str() ); if( NTL_SUCCESS != rc ) { return rc; } rc = OnConfiguration( m_strConfigFile.c_str() ); if( NTL_SUCCESS != rc ) { return rc; } rc = CNtlServerApp::OnCommandArgument( argc, argv ); if( NTL_SUCCESS != rc ) { return rc; } rc = OnCommandArgument( argc, argv ); if( NTL_SUCCESS != rc ) { return rc; } rc = CNtlServerApp::OnInitApp(); if( NTL_SUCCESS != rc ) { return rc; } rc = OnInitApp(); if( NTL_SUCCESS != rc ) { return rc; } rc = CNtlServerApp::OnCreate(); if( NTL_SUCCESS != rc ) { return rc; } rc = OnCreate(); if( NTL_SUCCESS != rc ) { return rc; } return NTL_SUCCESS; }
int CXtApp::InitApplication( int argc, TCHAR *argv[] ) { int nRet = FUN_RET_OK; /* Command Line Arguments Processing. */ nRet = ProcessShellCommand( argc, argv ); SetupDaemonMode(); nRet = OnInitApp(); if ( nRet < 0 ) { return -5; } return FUN_RET_OK; }