瀏覽代碼

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 9 年之前
父節點
當前提交
81b956b6ad
共有 2 個文件被更改,包括 9 次插入2 次删除
  1. 9 2
      nssm.h
  2. 二進制
      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 *);

二進制
nssm.rc