File tree Expand file tree Collapse file tree 2 files changed +18
-10
lines changed
Source/Include/KNSoft/NDK Expand file tree Collapse file tree 2 files changed +18
-10
lines changed Original file line number Diff line number Diff line change 44
55#include <SdkDdkVer.h>
66
7+ /* Patch undocumented NTDDI versions */
8+ #define NTDDI_WIN10_GE NTDDI_WIN11_ZN /* Introduced in Windows SDK 10.0.26100.1 (Win11), later than all NTDDI_WIN10_* */
9+ #define NTDDI_WIN11_DT NTDDI_WIN11_GE /* Introduced in Windows SDK 10.0.26100.3916, later than NTDDI_WIN11_GE */
10+
11+ /* Minimum support NT6.0 by default */
12+ #ifndef _KNSOFT_NDK_NTDDI_MIN
13+ #define _KNSOFT_NDK_NTDDI_MIN NTDDI_VISTA
14+ #endif
15+
716// MS-Spec: Nonstandard extension used: zero-sized array in struct/union
817#pragma warning(disable: 4200)
918
1019#if defined(_DEBUG ) && !defined(DBG )
1120#define DBG 1
1221#endif
1322
14- /* Patch undocumented NTDDI versions */
15- #define NTDDI_WIN10_GE NTDDI_WIN11_ZN /* Introduced in Windows SDK 10.0.26100.1 (Win11), later than all NTDDI_WIN10_* */
16- #define NTDDI_WIN11_DT NTDDI_WIN11_GE /* Introduced in Windows SDK 10.0.26100.3916, later than NTDDI_WIN11_GE */
17-
1823#pragma region Define architecture
1924
2025#if !defined(_68K_ ) && !defined(_MPPC_ ) && !defined(_X86_ ) && !defined(_IA64_ ) && !defined(_AMD64_ ) && !defined(_ARM_ ) && !defined(_ARM64_ ) && !defined(_ARM64EC_ ) && defined(_M_IX86 )
Original file line number Diff line number Diff line change @@ -313,7 +313,7 @@ _Inline_InitializeCriticalSectionAndSpinCount(
313313 _Out_ LPCRITICAL_SECTION lpCriticalSection,
314314 _In_ DWORD dwSpinCount)
315315{
316- #if NTDDI_VERSION >= NTDDI_VISTA
316+ #if _KNSOFT_NDK_NTDDI_MIN >= NTDDI_VISTA
317317 RtlInitializeCriticalSectionAndSpinCount (lpCriticalSection, dwSpinCount);
318318 return TRUE ;
319319#else
@@ -1122,8 +1122,6 @@ _Inline_InterlockedPushListSList(
11221122 return RtlInterlockedPushListSList (ListHead, List, ListEnd, Count);
11231123}
11241124
1125- #if NTDDI_VERSION >= NTDDI_WIN8
1126-
11271125__inline
11281126PSLIST_ENTRY
11291127WINAPI
@@ -1133,10 +1131,15 @@ _Inline_InterlockedPushListSListEx(
11331131 _Inout_ PSLIST_ENTRY ListEnd,
11341132 _In_ ULONG Count)
11351133{
1136- return RtlInterlockedPushListSListEx (ListHead, List, ListEnd, Count);
1137- }
1138-
1134+ return
1135+ #if _KNSOFT_NDK_NTDDI_MIN >= NTDDI_WIN8
1136+ RtlInterlockedPushListSListEx
1137+ #else
1138+ RtlInterlockedPushListSList
11391139#endif
1140+ (ListHead, List, ListEnd, Count);
1141+
1142+ }
11401143
11411144__inline
11421145USHORT
You can’t perform that action at this time.
0 commit comments