#include "stdafx.h" #include #include #include #include #include "RYL_AdminManagerServer.h" #include "resource.h" #include GGAUTHS_API void NpLog(int mode, char* msg) { } GGAUTHS_API void GGAuthUpdateCallback(PGG_UPREPORT report) { } // !Execption int WINAPI ExceptionUserFunc(char* szBuffer, int nBufferLen) { g_Log.Flush(); g_SessionLog.Flush(); return _snprintf(szBuffer, nBufferLen, "Exception Occured. Flush all buffers."); } int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { CNamedMutex Mutex("ROWAdminToolServer", true); if(GetLastError() == ERROR_ALREADY_EXISTS) { MessageBox(NULL, "Already AdminToolServer process exist.", "Err", MB_OK); return false; } // Exception ¿É¼Ç ¼³Á¤ unsigned long dwExceptionFeatures = CExceptionReport::CATCH_EXCEPTION | CExceptionReport::USE_MINIDUMP | CExceptionReport::USE_REPORT; CExceptionReport::GetInstance().Enable(dwExceptionFeatures); CExceptionReport::GetInstance().SetDumpLevel(MiniDumpWithFullMemory); CExceptionReport::GetInstance().SetUserFunc(ExceptionUserFunc); CRylAdminManagerServer& RylAdminMgrServer = CRylAdminManagerServer::GetInstance(); // ¼­¹ö ÃʱâÈ­ if(RylAdminMgrServer.Initialize( hInstance, "AdminToolServer", lpCmdLine, IDI_TRAY_ICON, IDR_MENU_POPUP)) { RylAdminMgrServer.ProcessMessage(); } return false; }