OSRLogo
OSRLogoOSRLogoOSRLogo x Seminar Ad
OSRLogo
x

Everything Windows Driver Development

x
x
x
GoToHomePage xLoginx
 
 

    Tue, 23 Oct 2018     118021 members

   Login
   Join


 
 
Contents
  Online Dump Analyzer
OSR Dev Blog
The NT Insider
Downloads
ListServer / Forum
  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
Getting Started Writing Windows Drivers
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.
bottom nav links