OSRLogoOSRLogoOSRLogo x OSR Custom Development Services

Everything Windows Driver Development

GoToHomePage xLoginx

    Thu, 18 Jan 2018     115933 members


  Online Dump Analyzer
OSR Dev Blog
The NT Insider
ListServer / Forum
Driver Jobs
  Express Links
  · The NT Insider Digital Edition - May-June 2016 Now Available!
  · Windows 8.1 Update: VS Express Now Supported
  · HCK Client install on Windows N versions
  · There's a WDFSTRING?
  · When CAN You Call WdfIoQueueP...ously

WINVER Incorrectly Defined in XP/.NET Beta DDK's Win2K Build Environment

Checking the definition of "WINVER" at compile time is one method that driver writers use to conditionally compile their code depending on the target platform. Long-time NT driver writers traditionally don't rely on this symbol, mostly because it was always set to 0x400 for Windows NT V3.1 through Windows NT V4.

In the Windows XP DDK, as well as the Windows .NET Beta 3 DDK, the value for WINVER is set to 0x501, even in the Win2K build environments. This is a bug, and has been corrected for future releases of the DDK after .NET Beta 3. Developers should carefully check to ensure that their drivers, as well as any public include files their drivers may reference, do not rely on the definition of WINVER.

An alternative to WINVER for conditional compilation tests in your driver, is to use the definitions VER_PRODUCTBUILD found in ntverp.h -- These reliably indicate the product's build number on any version of Windows.

Related Articles
Advantage: Driver Writer -- New Functions in the Windows XP DDK
XP DDK Resets PATH Environment Variable
New DDK Package -- The DDK Suite (Update)
Need the XP DDK FAST?
Must Use New DDK Compiler
Windows XP® DDK
Interview: All About the DDK
Guest Article: Simplifying Development with DDK Macros
The DDK Is Dead -- Long Live the LDK!

User Comments
Rate this article and give us feedback. Do you find anything missing? Share your opinion with the community!
Post Your Comment

Post Your Comments.
Print this article.
Email this article.

Writing WDF Drivers I: Core Concepts

Nashua (Amherst), NH
15-19 May 2017

Writing WDF Drivers II: Advanced Implementation Techniques

Nashua (Amherst), NH
23-26 May 2017

Kernel Debugging and Crash Analysis

Dulles (Sterling), VA
26-30 Jun 2017

Windows Internals and Software Driver Development

Nashua (Amherst), NH
24-28 Jul 2017


Need to develop a Windows file system solution?

We've got a kit for that.

Need Windows internals or kernel driver expertise?

Bring us your most challenging project - we can help!

System hangs/crashes?

We've got a special diagnostic team that's standing by.

Visit the OSR Corporate Web site for more information about how OSR can help!

bottom nav links