Built in DEFINE for OS version

It depends on the DDK version you use for your build, by that I mean which
setenv.bat you called with what ddk root path. You can easily roll a batch
file for yourself to set up such a preprocessor define.

For example,

set TARGETOS=WINXP

if “%TARGETOS%” = “WINXP” goto setenvxp
else if …

:setenvxp
set BASEDIR=“c:\winddk\2600”
call %BASEDIR%\bin\setenv %BASEDIR% checked
C_DEFINES=$(C_DEFINES) -DDDKVER=0x501

goto end

The in your code

#if DDKVER=0x501

#else if …

#endif

Cheers.

Bi

-----Original Message-----
From: Ken Galipeau [mailto:xxxxx@legato.com]
Sent: Monday, October 07, 2002 11:33 AM
To: File Systems Developers
Subject: [ntfsd] Built in DEFINE for OS version

When compiling during the build process is there a define that can be used
to determine what version of the OS the drive is being built for i.e. NT4,
Win2k, XP, and .NET? If so what are the values?


You are currently subscribed to ntfsd as: xxxxx@appstream.com
To unsubscribe send a blank email to %%email.unsub%%

I use the VER_PRODUCTBUILD defined in ntverp.h

NT3.51 1057
NT4.0 1381
Win2000 2195
WinXP 2600
.NET Server ?? (Currently 3678)

/ted

-----Original Message-----
From: Ken Galipeau [mailto:xxxxx@legato.com]
Sent: Monday, October 07, 2002 2:33 PM
To: File Systems Developers
Subject: [ntfsd] Built in DEFINE for OS version

When compiling during the build process is there a define that can be used
to determine what version of the OS the drive is being built for i.e. NT4,
Win2k, XP, and .NET? If so what are the values?


You are currently subscribed to ntfsd as: xxxxx@livevault.com
To unsubscribe send a blank email to %%email.unsub%%