int main(int argc, char* *argv)
{
    bool bResume;
    int iWorldID;
    int iInstanceID;

    CAppUtility::AppLaunch(argc, argv, CRegAuthApp::SetAppCmd, bResume, iWorldID, iInstanceID);

    CSharedMemory stShmMain;
    CApp* pApp = CShmObjectCreator<CRegAuthApp>::CreateObjectByKey(&stShmMain, GenerateServerShmKey(GAME_SERVER_REGAUTH,0));
    if (!pApp)
    {
        exit(3);
    }

    int iRet = pApp->Initialize(bResume, iWorldID);
    if (iRet != 0)
    {
        exit(4);
    }

    pApp->Run();

    return 0;
}
示例#2
0
//-----------------------------------------------------------------------------
// Name: wWinMain()
// Desc: The application's entry point
//-----------------------------------------------------------------------------
INT WINAPI wWinMain( HINSTANCE hInst, HINSTANCE, LPWSTR, INT )
{
	#if defined(DEBUG) | defined(_DEBUG)
	_CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
	//_CrtSetBreakAlloc(234);
#endif

	//_wsetlocale(LC_ALL, _T("korean") );

	UNREFERENCED_PARAMETER( hInst );

	CApp* pApp = new CApp();

	if(FAILED(pApp->Initialize(
		hInst, _T("ExpressWork"), _T("qiomoip"), SCREEN_WIDTH, SCREEN_HEIGHT)))
	{
		Safe_Delete(pApp);
		return 0;
	}

	pApp->Run();

	Safe_Delete(pApp);

	#ifdef _DEBUG
	_CrtDumpMemoryLeaks();
#endif
	return 0;
}
示例#3
0
int main(int argc, char *argv[])
{
    gApp.RelayoutArgs(argc, argv);
    gApp.Initialize(argc, argv) && gApp.Startup() && gApp.Run();
    gApp.Shutdown();

    return 0;
}