File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 1+ // If the user hasn't specified a target Windows version via _WIN32_WINNT, and is using an _xp toolset (indicated by _USING_V110_SDK71_),
2+ // then _WIN32_WINNT will be set to Windows XP (0x0501).
3+ #if !defined(_WIN32_WINNT) && defined(_USING_V110_SDK71_)
4+ #define _WIN32_WINNT _WIN32_WINNT_WINXP
5+ #define WINVER _WIN32_WINNT_WINXP
6+ #endif
7+
8+ // For memory leak finding
19#ifdef _CRTDBG_MAP_ALLOC
210#include < stdlib.h>
311#include < crtdbg.h>
412#endif
13+
514#include < iostream>
615#include < ctime>
716#include < sstream>
@@ -87,11 +96,15 @@ int ExitWithError(const char * msg, int error)
8796
8897int main ()
8998{
99+ // Enable memory tracking (does nothing in Release)
90100 _CrtSetDbgFlag (_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
101+
102+ // Handle closing nicely
91103 SetConsoleCtrlHandler (CloseHandler, TRUE );
92104
93- // for colouring
105+ // For console text colouring
94106 hStdout = GetStdHandle (STD_OUTPUT_HANDLE);
107+
95108#ifdef _lacewing_debug
96109 FILE * f = NULL ;
97110 if (fopen_s (&f, " Bluewing Server error.log" , " w" ))
You can’t perform that action at this time.
0 commit comments