Browse Source

Workaround for Resource Compiler warnings/errors under VS2010.

VS2010 RC.exe yielded lots of warnings and some errors when including some (unnecessary) platform header files via nssm.h. So now including only what is really required.
This includes a workaround for error RC2247 found here: http://stackoverflow.com/a/18317658
Mathias Breiner 6 years ago
parent
commit
81b956b6ad
2 changed files with 9 additions and 2 deletions
  1. 9 2
      nssm.h
  2. BIN
      nssm.rc

+ 9 - 2
nssm.h

@@ -33,13 +33,19 @@
 #define DIR_LENGTH PATH_LENGTH - 12
 
 #define _WIN32_WINNT 0x0500
+
+#define APSTUDIO_HIDDEN_SYMBOLS
+#include <windows.h>
+#include <prsht.h>
+#undef APSTUDIO_HIDDEN_SYMBOLS
+#include <commctrl.h>
+#include <tchar.h>
+#ifndef NSSM_COMPILE_RC
 #include <fcntl.h>
 #include <io.h>
 #include <shlwapi.h>
 #include <stdarg.h>
 #include <stdio.h>
-#include <tchar.h>
-#include <windows.h>
 #include "service.h"
 #include "account.h"
 #include "console.h"
@@ -53,6 +59,7 @@
 #include "settings.h"
 #include "io.h"
 #include "gui.h"
+#endif
 
 int str_equiv(const TCHAR *, const TCHAR *);
 void strip_basename(TCHAR *);

BIN
nssm.rc