#include "stdafx.h" #include #include #include #include "PortalServer.h" #include "ServerGlobal.h" //================================================================================================== // @desc ¸Þ¸ð¸® ´©¼ö ¸®Æ÷ÅÍ »ç¿ë ¿©ºÎ #ifdef _DEBUG # define USE_MEMORY_LEAK_REPORT 1 #else # define USE_MEMORY_LEAK_REPORT 0 #endif #define MEMORY_LEAK_REPORT_FILE "memory_leak_Portal.txt" // @desc °øÀ¯µÈ ¸Þ¸ð¸® ´©¼ö Ãâ·Â ÆÄÀϸí #define MEMORY_LEAK_REPORT_FILE_FOR_SHARED "../_bin/memory_leak_Portal_shared.txt" #include "./SharedMemoryLeakReporter.hxx" //================================================================================================== // Global SolarSimpleConsole g_Console; extern "C" { int WinMainCRTStartup(); } int SunEntryPoint() { SharedMemoryPool::CreateInstance(); return WinMainCRTStartup(); } int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { //SolarDump dp( ".", MiniDumpWithFullMemory ); SolarDump dp; // ÄܼÖâ ÃʱâÈ­ CONSOLE_DESC cdesc; ZeroMemory( &cdesc, sizeof(cdesc) ); cdesc.bUsingConsoleInput = FALSE; cdesc.bUsingRedirect = TRUE; g_Console.Init( &cdesc ); // ¸í·É Àμö ÆÄ½Ì if( !ParseArguments( (LPTSTR)lpCmdLine ) ) { DISPMSG( "Invalid argument!\n" ); system( "pause" ); return 0; } g_PortalServer.DoInit( "./PortalServer.ini", PortalServer::DoAllocServerSession, PortalServer::DoFreeServerSession, PortalServer::DoFreeConnectSession, PortalServer::DoAllocClient_NotUsed, PortalServer::DoFreeClient_NotUsed, PortalServer::DoFreeConnect_NotUsed ); g_PortalServer.DoProcess(); g_PortalServer.DoRelease(); // ÄܼÖâ Á¾·á g_Console.Release(); return 0; }