SURVEY: Using more than one version of the WDK

Recently in a discussion with the WDK team, the problem of working in
multiple versions of the WDK was brought up. Microsoft does not see this
problem internally since it uses the latest WDK for almost everything. So
I would like to ask a simple survey to folks on NTDEV:

1… In normal work do you have more than one version of the WDK in use?
If so why?
2… When the WDK beta comes out, do you try it with current projects? If
so do you try to use the same copy of the sources for both, or clone one
specifically for the beta?
3… Have you encountered problems with using more than one WDK? Would you
like to have a way to conditionalize the build files or the driver source
for differing WDK versions?


Don Burn (MVP, Windows DDK)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

__________ Information from ESET NOD32 Antivirus, version of virus signature database 4148 (20090611) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

I figured I would answer my own questions:

1… In normal work do you have more than one version of the WDK in use?
If so why?

Right now I have clients who use differing version of the WDK, so I have to
match their environments. This includes code that is shared from project to
project of these clients. In the future I expect this more, since my
clients still want Windows 2000 and the Windows 7 WDK will not build for
that platform.

2… When the WDK beta comes out, do you try it with current projects? If
so do you try to use the same copy of the sources for both, or clone one
specifically for the beta?

I try to use the same project. This is a pain, since I do not accept
PreFast errors and with the addition of more and more types for
__drv_functionClass annotations there is no way to make the same source file
clean in all environments without some kludgey conditional code.

3… Have you encountered problems with using more than one WDK? Would
you like to have a way to conditionalize the build files or the driver
source for differing WDK versions?

Yes over the years I have had to create a number of workarounds. Any yes I
would like to see a way to determine the version of the WDK I am invoking
for the project.


Don Burn (MVP, Windows DDK)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

__________ Information from ESET NOD32 Antivirus, version of virus signature database 4148 (20090611) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

  1. Yes. Support for W2K has been removed from later WDKs. Full regression
    testing with later WDKs requires too much time to take such a risk.
  2. Yes. Same sources as I find very few occasions where a change is
    required.
  3. We use our own build batch files that invoke the appropriate setenv.

“Don Burn” wrote in message news:xxxxx@ntdev…
> Recently in a discussion with the WDK team, the problem of working in
> multiple versions of the WDK was brought up. Microsoft does not see this
> problem internally since it uses the latest WDK for almost everything.
> So I would like to ask a simple survey to folks on NTDEV:
>
>
>
> 1… In normal work do you have more than one version of the WDK in use?
> If so why?
> 2… When the WDK beta comes out, do you try it with current projects? If
> so do you try to use the same copy of the sources for both, or clone one
> specifically for the beta?
> 3… Have you encountered problems with using more than one WDK? Would
> you like to have a way to conditionalize the build files or the driver
> source for differing WDK versions?
>
> –
> Don Burn (MVP, Windows DDK)
> Windows Filesystem and Driver Consulting
> Website: http://www.windrvr.com
> Blog: http://msmvps.com/blogs/WinDrvr
>
>
>
> Information from ESET NOD32 Antivirus, version of virus
> signature database 4148 (20090611)

>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>
>
>

Don Burn wrote:

Recently in a discussion with the WDK team, the problem of working in
multiple versions of the WDK was brought up. Microsoft does not see this
problem internally since it uses the latest WDK for almost everything. So
I would like to ask a simple survey to folks on NTDEV:

1… In normal work do you have more than one version of the WDK in use?
If so why?

Yes, I currently have 6 versions installed, both at work and at home.
* 2600 (XP)
* 3790 (Server 2003)
* 3790.1830 (Server 2003 SP1)
* 6000 (Vista)
* 6001.18002 (Vista SP1)
* 7100 (Win 7 RC1)

I do builds using each of the last three (occasionally). The first
three are just for reference.

Like Don, I have clients with regulatory concerns who release drivers
only after lengthy validation. If one of them encounters a problem in a
driver built with the 6000 WDK, I need to deliver a fix based on the
6000 WDK. Switching to a new WDK means revalidating.

I also keep the old one around for reference, and for answering
questions on mailing lists and newsgroups. Also, the good samples
sometimes come and go. The best and most complete BDA sample driver
(the Europa sample) exists in exactly one of those DDKs – 3790.1830.

2… When the WDK beta comes out, do you try it with current projects? If
so do you try to use the same copy of the sources for both, or clone one
specifically for the beta?

I generally try the beta with my current projects. I keep the same copy
of the sources for both. My clients have not yet insisted on being
completely Prefast-clean, so Don’s specific issue has not arisen for me.

3… Have you encountered problems with using more than one WDK? Would you
like to have a way to conditionalize the build files or the driver source
for differing WDK versions?

Although I understand Don’s issue, and think a solution would be
appropriate, this has not been an issue for me. The only time this has
been an issue for me was with the original KMDF release, before it was
integrated in the WDK. KMDF required changes to the sources file that
were not appropriate after it was integrated into the WDK.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

  1. Yes, I do. Windows 7 WDK does not contains Windows 2000 build. My team still support this OS.
  2. I always try on the same source directory.
  3. Only one time. It was a problem with KMDF which Tim Roberts describes.

Igor Sharovar
Hewlett-Packard

OF COURSE. It’s absolutely necessary due to changes among the various versions.

I’ll usually try it “for fun” to provide feedback to the WDK team, with whatever project happens to be checked out or hanging around. We don’t try it “for real” until either it ships and we have to support our clients using it or we have a specific need to support the new OS that’s supported by the WDK. We don’t typically update “just because it’s been released” do the pain of the update process.

YES and YES. Every time a new WDK comes out, it breaks our build. We always have to go through a process of “Getting xxxx working with the new WDK.” Sometimes it’s monstrously painful, sometimes it’s not bad. But there’s always changes.

Even just the changes to the compiler/linker can be a pain. Hey, this didn’t generate a warning before! Hey, the /FORCE switch on the linker used to work (sorry, that one bit us earlier this week).

It’s always something.

Peter
OSR

I develop printer drivers for wide format printers.

1… In normal work do you have more than one version of the
WDK in use?
If so why?

No. I only switch to a new WDK when I have time between releases to
test fully.
Recently switched from 3790.1830 to 6001.18002 because we dropped win2k
support.

2… When the WDK beta comes out, do you try it with current
projects? If
so do you try to use the same copy of the sources for both,
or clone one
specifically for the beta?

I’ve never used beta anything from MS since Chicago. (Unless you count
Vista as a win7 beta)

3… Have you encountered problems with using more than one
WDK? Would you
like to have a way to conditionalize the build files or the
driver source
for differing WDK versions?

N/A.
Since I had to make changes to my sources file when switching to 6001, I
think the idea is a good one. But I have the luxury of saying, “Eh,
I’ll stick with the current WDK” if I want to.

ScottR

> ? 1… In normal work do you have more than one version

of the WDK in use?

Yes, of course.

If so why?

6xxx up ddk doesn’t compile binary compatible ndis5x miniport drivers in a clean way. ndis5x drivers still have long way to go. And we just remove building driver for nt4 not so long ago. And some DDK do BREAK things.

? 2… When the WDK beta comes out, do you try it with
current projects??

Of course not. To us with zero visibility to the compiler, it’s an unknown. We have way too many things to worry about and don’t really have time to be a beta tester at the risk of breaking millions of systems in the field. A full regression test is just taking too much resources and it’s very expensive.

I agree with Peter that I would try it for fun.

If so do you try to use the same copy of the sources for both,
or clone one
specifically for the beta?

That would be a nightmare if one have multiple branches to maintain. We try to make the source code insensitive to DDK. In fact, a big portion of code has to be platform insensitive.

? 3… Have you encountered problems with using more
than one WDK?

Some but it’s solvable.

Calvin Guan
Converged NIC, NT drivers
Broadcom Corp.
Connecting Everything(r)


1… In normal work do you have more than one version of the WDK in use?
If so why?

Reason #1: Win2K.

Reason #2: My customers want to know that their drivers will build with the
new WDK before they are required to use it (by WHQL standards). During the
transition it is preferred to be able to continue to build with the previous
version(s) and ‘promote’ the new WDK (and required changes) in a reversible
way. Maintaining separate source control branches for this purpose is
considered ‘expensive’.


2… When the WDK beta comes out, do you try it with current projects? If
so do you try to use the same copy of the sources for both, or clone one
specifically for the beta?

Absolutely and yes, with the same sources. This is how the continuity (or
change cost) is initially estimated. A separate branch (clone of the
source) is created only when the changes to get it to a stable build are
either non-backward compatible or so onerous as to be considered a sizeable
risk.


3… Have you encountered problems with using more than one WDK? Would you

like to have a way to conditionalize the build files or the driver source
for differing WDK versions?

Yes & yes (somewhat).

Conditional SOURCES= (or macro evaluation prior to BUILD.EXE generating
_objects.mac) would be very nice. It always seemed to me that NMAKE /
MAKEFILE.NEW could be taught to just ‘emit’ the final evaluated SOURCES
macro and have build.exe invoke nmake with a special target which outputs
this value when it detects a need to generate _objects.mac. Or something
like that.

I realize this runs contrary to the NTOS build team’s goal of reducing the
number of NMAKE passes and overall NTOS build time. OTOH, we don’t build a
gazillion modules for one target, we build a few modules for a few targets
with a few kits. I would not care one bit if my build times went up two
seconds per SOURCES file to conditionally evaluate SOURCES= instead of just
reading it without macro expansion in BUILD.EXE to generate _objects.mac

And it does seem that SOURCES= (and xxxx_SOURCES=) are the only macros that
are consumed in the build that are not *always* processed by running NMAKE,
right?

Cheers,
Dave Cattley

Robins, Scott wrote:

Recently switched from 3790.1830 to 6001.18002 because we dropped win2k
support.

Umm, 6001.18002 still includes Win2K support…


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

D*mn! All that work for nothing :slight_smile:

ps please don’t tell my boss it still supports win2k…

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Tim Roberts
Sent: Thursday, June 11, 2009 3:49 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] SURVEY: Using more than one version of the WDK

Robins, Scott wrote:
> Recently switched from 3790.1830 to 6001.18002 because we dropped
> win2k support.
>

Umm, 6001.18002 still includes Win2K support…


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online
at http://www.osronline.com/page.cfm?name=ListServer

> -----Original Message-----

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Don Burn
Sent: Thursday, June 11, 2009 7:14 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] SURVEY: Using more than one version of the WDK

1… In normal work do you have more than one version of the
WDK in use?

Sure, always.

If so why?

Because we have drivers which were developed, debugged and tested using
older WDKs. Some of them didn’t change for years. Wy to invest all the
time to new testing and qualification? And risk a problem at customers’
machines?

Of course, new driver for Win7 is developed using new WDKs updated
regularly (though not every version). But for XP/Vista driver which some
customers use also at Win7 I still use older one and don’t see any
reason to change. That’s the point: there has to be a good reason to
change and pure existence of new version isn’t.

2… When the WDK beta comes out, do you try it with current
projects? If
so do you try to use the same copy of the sources for both,
or clone one
specifically for the beta?

Only for Win7 project under development.

3… Have you encountered problems with using more than one
WDK? Would you
like to have a way to conditionalize the build files or the
driver source
for differing WDK versions?

Yes. We use WDK build as one relatively small sub-task of whole build.
Our buildengine prepares environment, calls requested setenv.bat and
finally build.exe. Any change in setenv/build parameters of behaviour
causes problems and makes builder more complicated. One example:
amd64/x64. No problem if changes are backward compatible but they
sometimes aren’t. Worse problem is in SOURCES, I tend to use make
snippets for standard tasks (as generating version info for example) and
include them in SOURCES.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]

My answers are basically identical to PGV’s: yes, yes, yes.

mm

  • 1 to David

As for conditionalizing on WDK versions:

since v. 3790, it seems that the directory name
where the kit is installed, can be used as it’s version id.

The following batch file snippet gets this directory name.
In case you want to use it as a C macro, dots in
the dir name can be replaced by underscores, etc.

Regards,
– PA

-------------- cut here ----------
setlocal
if not defined BASEDIR (echo ERROR! BASEDIR not set && exit /b 1)
set _tmp=%BASEDIR%

call :sub1 %_tmp%
echo WDK_VERSION=%_tmp%
echo WDK_VERSION2=%tmp:.=%
goto :EOF

:sub1
set _tmp=%~nx1
goto :EOF
-------------- cut here ----------

That of course assumes you let the installer use the default directory names :wink:

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Pavel A.
Sent: Thursday, June 11, 2009 2:28 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] SURVEY: Using more than one version of the WDK

  • 1 to David

As for conditionalizing on WDK versions:

since v. 3790, it seems that the directory name where the kit is installed, can be used as it’s version id.

The following batch file snippet gets this directory name.
In case you want to use it as a C macro, dots in the dir name can be replaced by underscores, etc.

Regards,
– PA

-------------- cut here ----------
setlocal
if not defined BASEDIR (echo ERROR! BASEDIR not set && exit /b 1) set _tmp=%BASEDIR%

call :sub1 %_tmp%
echo WDK_VERSION=%_tmp%
echo WDK_VERSION2=%tmp:.=%
goto :EOF

:sub1
set _tmp=%~nx1
goto :EOF
-------------- cut here ----------


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Don Burn wrote:

Recently in a discussion with the WDK team, the problem of working in
multiple versions of the WDK was brought up. Microsoft does not see this
problem internally since it uses the latest WDK for almost everything. So
I would like to ask a simple survey to folks on NTDEV:

1… In normal work do you have more than one version of the WDK in use?
If so why?

Throw into Tim’s list the NT40 DDK for reference, it contains the
original rdbss source code. Mostly they are for reference prior to 18002
, except 3790.1830, but for some support of the WPP stuff, building with
3790.1830 is required for Windows 2000 (Note: I only support the drivers
with the WPP mechanism, I would NEVER use it in a new product but that
is an entirely different thread)

2… When the WDK beta comes out, do you try it with current projects? If
so do you try to use the same copy of the sources for both, or clone one
specifically for the beta?

For fun, yes. Otherwise I stick with 18002 and 3790.1830.

3… Have you encountered problems with using more than one WDK? Would you
like to have a way to conditionalize the build files or the driver source
for differing WDK versions?

This would be fantastic.

Pete


Kernel Drivers
Windows File System and Device Driver Consulting
www.KernelDrivers.com
866.263.9295

Was there not some half-hearted (and now seemingly abandoned) attempt to put
a file named DDKVersion.xml in the root folder of the kit? I think that
showed up and went away in the Longhorn kits, right?

Laundry list of things that I wish the WDK build environment supported:

  1. Steal a page from the WINCE Build. Have SETENV.BAT look in a rational
    place for %USERNAME%.BAT to call (if present) at various points in the
    SETENV.BAT process. Or something like that. I suppose I could add that to
    my ever diverging version of DDKBUILD.BAT…

  2. BUILD and MAKEFILE.DEF able to deal with sources inferred from
    additional paths other than {. | …}{. | }

    3. Document and harden the use of PROJECT.MK. I find that feature
    incredibly useful but am ever fearful I will break something or a new kit
    will break me.

    4. Just like MAKEFILE.DEF support MIN/MAX target version ‘filtering’, let’s
    have MIN/MAX ‘kit version’ filtering.

    5. Kit version as an environment variable. C’mon - that is a one-liner in
    SETENV.BAT.

    6. OACR ‘disable’ by an environment variable so I can set it on my build
    machines and forget about it and not worry which kits notice its existence.
    Or something like that.

    7. I wan’t to use separate_object_root, really I do. And BinPlace. And
    have symbols staged to a SymSrv compatible folder, two actually, one
    stripped and one full. I don’t want to spend a month of Sundays figuring
    that all out.

    8. I want to be able to build MFC, ATL, and WTL targets with low to zero
    pain. Since WTL does not come in the kit, I would prefer not having to
    jump through hoops to get the WTL include path just so, especially since
    MAKFILE.NEW thinks “just so” is way different than how WTL itself is
    distributed. Go figure.

    9. I want to be able to build UM targets that use NTDLL.DLL exports of the
    Zw/Nt and Rtl variety. The Platform SDK or VC++ or something shipped with a
    header for a subset of native APIs but the WDK does not?

    If it is simply that I am too dumb to know that I can do some or all of
    these things with the current tools then consider the request to be morphed
    into “update the docs to point me at how”.

    Dave Cattley

    -----Original Message-----
    From: xxxxx@lists.osr.com
    [mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
    Sent: Thursday, June 11, 2009 5:33 PM
    To: Windows System Software Devs Interest List
    Subject: RE: Re:[ntdev] SURVEY: Using more than one version of the WDK

    That of course assumes you let the installer use the default directory names
    :wink:

    d

    -----Original Message-----
    From: xxxxx@lists.osr.com
    [mailto:xxxxx@lists.osr.com] On Behalf Of Pavel A.
    Sent: Thursday, June 11, 2009 2:28 PM
    To: Windows System Software Devs Interest List
    Subject: Re:[ntdev] SURVEY: Using more than one version of the WDK

    + 1 to David

    As for conditionalizing on WDK versions:

    since v. 3790, it seems that the directory name where the kit is installed,
    can be used as it’s version id.

    The following batch file snippet gets this directory name.
    In case you want to use it as a C macro, dots in the dir name can be
    replaced by underscores, etc.

    Regards,
    – PA

    -------------- cut here ----------
    setlocal
    if not defined BASEDIR (echo ERROR! BASEDIR not set && exit /b 1) set
    _tmp=%BASEDIR%

    call :sub1 %_tmp%
    echo WDK_VERSION=%_tmp%
    echo WDK_VERSION2=%tmp:.=%
    goto :EOF

    :sub1
    set _tmp=%~nx1
    goto :EOF
    -------------- cut here ----------


    NTDEV is sponsored by OSR

    For our schedule of WDF, WDM, debugging and other seminars visit:
    http://www.osr.com/seminars

    To unsubscribe, visit the List Server section of OSR Online at
    http://www.osronline.com/page.cfm?name=ListServer


    NTDEV is sponsored by OSR

    For our schedule of WDF, WDM, debugging and other seminars visit:
    http://www.osr.com/seminars

    To unsubscribe, visit the List Server section of OSR Online at
    http://www.osronline.com/page.cfm?name=ListServer

Doron Holan wrote:

That of course assumes you let the installer use the default directory names :wink:

d

Of course, you have lots of various kits and a more sophisticated naming
system :slight_smile:
We outsiders get only few public versions.

– pa

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Don Burn
Sent: Thursday, June 11, 2009 1:14 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] SURVEY: Using more than one version of the WDK

Recently in a discussion with the WDK team, the problem of working in
multiple versions of the WDK was brought up. Microsoft does not see this
problem internally since it uses the latest WDK for almost everything. So
I would like to ask a simple survey to folks on NTDEV:

1… In normal work do you have more than one version of the WDK in use?
If so why?
[PCAUSA] Of course! Drivers that must be maintained currently span the W2K
to Win7 platforms. Must “revisit” projects built under older tools
occasionally and there is risk is switching to new build tool to debug or
fix small problem in older driver.

My development machine has 8 DDK folders, but some of the older ones are not
“installed”. Just keep header files, sample code and documentation for
reference.

I actively use 3790.1830 and 6001.18002. The Win7 WDK is around “somewhere”
but not on precious development machines.

2… When the WDK beta comes out, do you try it with current projects? If
so do you try to use the same copy of the sources for both, or clone one
specifically for the beta?
[PCAUSA] I will try to use the newer DDK as time permits. Usually start
with a copy of a build tree from previous DDK as starting point.

Testing with new DDK is first done on machine that can be re-imaged since
there are too often side-effects that cause unanticipated problems (like
help files that quit working…).

3… Have you encountered problems with using more than one WDK? Would you

like to have a way to conditionalize the build files or the driver source
for differing WDK versions?
[PCAUSA] No real problems, but my drivers are generally simpler than most.

Thomas F. Divine


Don Burn (MVP, Windows DDK)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

__________ Information from ESET NOD32 Antivirus, version of virus signature
database 4148 (20090611) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Pavel A. wrote:

Doron Holan wrote:
> That of course assumes you let the installer use the default directory
> names :wink:

Recent WDKs can be xcopied or renamed, if the default
installation directory names are not suitable.

Of course, you have lots of various kits and a more sophisticated naming
system :slight_smile:
We outsiders get only few public versions.

– pa