////////////////////////////////////////////////// // Launcher to launch Danbias server // // Created by [Dennis Andersen] [2013] // ////////////////////////////////////////////////// #define NOMINMAX //Blame it on windows #include #include #include #include #include int WINAPI WinMain( HINSTANCE hinst, HINSTANCE prevInst, PSTR cmdLine, int cmdShow) { if(SetDllDirectory(L"..\\DLL") == FALSE) { return cmdShow; } WindowShell::CreateConsoleWindow(); DanBias::GameServerAPI::ServerInitDesc desc; desc.listenPort = 15151; if(DanBias::GameServerAPI::ServerInitiate(desc) == DanBias::DanBiasServerReturn_Sucess) { DanBias::GameServerAPI::ServerStart(); while (!(GetAsyncKeyState(0x51))) //Q for exit { DanBias::GameServerAPI::ServerUpdate(); Sleep(1); } DanBias::GameServerAPI::ServerStop(); } return cmdShow; }