Windows 10 SDK 18362 appears to have broken <ntddndis.h>
In Windows 10 SDK 17763, including <ntddndis.h>
would do a bunch of checks like defined(UM_NDIS682)
to identify the available NDIS API version, where that definition is optionally provided by the user, e.g.
//
// Something to identify new (RS5 and up) applications.
// User-mode only. For drivers, NDIS_SUPPORT_NDIS682 is already
// defined in ndismain.w.
//
#if !defined(NDIS_SUPPORT_NDIS682)
#if (defined (UM_NDIS682))
#define NDIS_SUPPORT_NDIS682 1
#else
#define NDIS_SUPPORT_NDIS682 0
#endif
#endif // !defined(NDIS_SUPPORT_NDIS682)
In Windows 10 SDK 18362, <ntddndis.h>
delegates to <ndis/version.h>
. This header appears to be shared with the Windows Driver Development Kit.
The <ndis/version.h>
header raises warnings (C4668
) because when it does the same set of checks, it also checks the value of NDIS_MINIPORT_MAJOR_VERSION
and NDIS_MINIPORT_MINOR_VERSION
without first checking if they are defined, e.g.
#if defined(UM_NDIS683) || defined(NDIS_WRAPPER) || \
(defined(NDIS_PLATFORM) && (defined(NDIS683) || defined(NDIS683_MINIPORT))) || \
(NDIS_MINIPORT_MAJOR_VERSION == 6 && NDIS_MINIPORT_MINOR_VERSION == 83)
#define NDIS_SUPPORT_NDIS683 1
#endif
In the DDK, NDIS_MINIPORT_MAJOR_VERSION
and NDIS_MINIPORT_MINOR_VERSION
are defined by <ndis.h>
, but in the Windows SDK, there's no code that defines those macros.
This is a two-year-old problem, but for example the one large piece of software to hit this that I'm aware of (Unreal Engine upgrading their build servers to SDK 18362) worked around it in their codebase by defining NDIS_MINIPORT_MAJOR_VERSION
in their build system and apparently never returned to track down why this happened.
This code appears unchanged apart from the addition of newer version targets in the 19041 and 20348 SDKs.
Interestingly, I saw on a code-support website that an older (Windows 7 or Windows 8 DDK) version of <ndis/version.h>
did have checks for defined(NDIS_MINIPORT_MAJOR_VERSION)
in this code, so they were removed at some point since then.