There is no way to replace FOO with the value of BAR in cpp.
#define SECURITY_WIN32
#include <security.h>
#if _WIN32_WINNT < 0x0501
-#define AFS_WIN32_WINNT _WIN32_WINNT
#undef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#endif
#include <ntsecapi.h>
-#ifdef AFS_WIN32_WINNT
-#undef _WIN32_WINNT
-#define _WIN32_WINNT AFS_WIN32_WINNT
-#undef AFS_WIN32_WINNT
-#endif
#endif /* USE_MS2MIT */
#include <stdio.h>
#include <string.h>
#include "afskfw-int.h"
#include "afskfw.h"
#include <userenv.h>
+
#include <Sddl.h>
#include <Aclapi.h>
#include <objbase.h>
#include <npapi.h>
#if (_WIN32_WINNT < 0x0501)
-#define AFS_WIN32_WINNT _WIN32_WINNT
#undef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#endif
#include <ntsecapi.h>
-#ifdef AFS_WIN32_WINNT
-#undef _WIN32_WINNT
-#define _WIN32_WINNT AFS_WIN32_WINNT
-#undef AFS_WIN32_WINNT
-#endif
#include <tchar.h>
#include <strsafe.h>
#define SECURITY_WIN32
#include "afslogon.h"
+#if (_WIN32_WINNT < 0x0500)
+#error _WIN32_WINNT < 0x0500
+#endif
+
/**/
#include <security.h>
#include <sddl.h>
#define __SMB_H_ENV__ 1
#if _WIN32_WINNT < 0x0501
-#define AFS_WIN32_WINNT _WIN32_WINNT
#undef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#endif
#include <ntsecapi.h>
-#ifdef AFS_WIN32_WINNT
-#undef _WIN32_WINNT
-#define _WIN32_WINNT AFS_WIN32_WINNT
-#undef AFS_WIN32_WINNT
-#endif
/* Support largefiles by default */
#define AFS_LARGEFILES