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 ----------

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

David R. Cattley wrote:

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

    AFAIK this is because of nmake limitation -
    no support for “pattern rules”, like in GNU make.
    So, not feasible - unless they fix or replace nmake.

    > 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.

    +1

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

    Already done with this wish, not? :slight_smile:

    > 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.

    Here you are again, at least for 6000+ , 7000 and 7100 WDKs.
    Add this to your ddkbuild.bat clone:

    if exist %BASEDIR%\bin\oacr* set _no_oacr=NO_OACR

    call %BASEDIR%\bin\setenv.bat [other args] %_no_oacr%

    Thanks.
    – pa
  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…

Not that we’re in any imminent danger of this (excellent) idea happening, but doesn’t BUILD do something perverse with %USERNAME%?

mm

One I would like to add to Dave’s list: the ability to run setenv.bat more than once from the same command prompt without having to set _NTROOT=.

m

  1. Never. I always use the latest which is required for logo. Don’t wish to invest in outdated tools.
  2. Never. At best may beta test in an isolated/temporary VM
  3. Never. I uninstall the old WDK to get rid of it, then install the new one into the exact same folder.

I never want more than one WDK installed on a machine and it is always the latest.

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

I’ve been Home Depot to driver writers - so provide specialized codes ( tools) to use for their work so I need more than one versions in hand.

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?

Try to avoid building existing product with new beta, unless there is something exciting. For example: Using Driver Verifier, OACR etc. And I used the brute force: Clone. But sure I try to look for new features ( alternative methods to do the work: wsk, ndis filters are examples )

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?

I would love to see it is in the sources file, and sticks out like a cop’s Light from behind.

Well, as if I’ve to sign something !
Prokash Sinha
http://prokash.squarespace.com
Your misery is my paycheck!

“Don Burn” wrote in message
news:4a313b4e.9c53f10a.6e2d.78fcSMTPIN_ADDED@mx.google.com
> 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 do not migrate to a newer WDK for older drivers. But sometimes I use
newer WDKs to run PFD over older drivers.

> 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?

Sometimes. And I always try to keep the same sources. Maintaining multiple
branches of the sources because of different WDK version is just too much of
a pain.

> 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?

Rarely, and a couple of fixes in the sources made the driver compile on both
older and newer WDKs.

Have a nice day
GV

>
> –
> 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

xxxxx@evitechnology.com wrote:

  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…

Not that we’re in any imminent danger of this (excellent) idea happening, but doesn’t BUILD do something perverse with %USERNAME%?

Not BUILD directly, but the build environment does. Setenv.bat sets
USERNAME to WinDDK, and the default resource script embeds that in the
resource strings for your drivers. One of the first things I do in my
setenv wrappers is to change USERNAME back to timr.


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

I work with mulitple active and separate development efforts (in
different organizations that is) and one of those organizations
maintains products for at least 10 years, by contract, and does so for
software by archiving all tools within their configuration management
system, including of course DDKs. At any point in time at least three
versions of the DDK /WDK are in use within either support or
development.

Internally I use three versions of the WDK: VISTA, W2K8, and now WIN7.
My internal development is on the latest released WDK, but I have
customers using the earlier 6000 release. My tools are setup to use
ANY version of the WDK, and to easily migrate between versions as the
need arises.

Most of my customers use one version of the WDK - but hardly ever the
same one between customers - so I have to be able to flip a switch and
build using one toolset for one project and one for another. My
automated overnight build process is happy to build lots of projects
with any supported (by me) release of the WDK.

Mark Roddy

On Thu, Jun 11, 2009 at 6:59 PM, Thomas F. Divine wrote:
>
>
> -----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
>
>
> —
> 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
>

This is a great thread. Thanks for starting it, Don.
David (Cattley), great list of suggestions.

As you can tell, there isn’t a “one size fits all” approach to using the WDK. We’re starting to think about how we can provide a standardized approach to customization (is that an oxymoron?) and how we can make the build tools we supply modular so they can be fit into your build systems. At the same time, we need to retain compatibility with the Windows build system and building Windows is a vastly different task than most of you have building drivers.

We do listen to your feedback.
Thanks!

Jen,

I’m glad you are listening. I should like to point out that that list (or
a large part of it) along with suggestions from many community members
present were rattled off at DevCon when we (as a community) were asked for
that feedback as well as at WinHEC/DevCon-s gone by. I wish I had the
audio from the particular session I am thinking of - I know Mark Roddy had
plenty to add during that session which made tons of sense to me. I just
don’t have notes as to recall what all it was. I am sure I have plagiarized
some of that discussion.

-dave

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@microsoft.com
Sent: Friday, June 12, 2009 7:40 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] SURVEY: Using more than one version of the WDK

This is a great thread. Thanks for starting it, Don.
David (Cattley), great list of suggestions.

As you can tell, there isn’t a “one size fits all” approach to using the
WDK. We’re starting to think about how we can provide a standardized
approach to customization (is that an oxymoron?) and how we can make the
build tools we supply modular so they can be fit into your build systems.
At the same time, we need to retain compatibility with the Windows build
system and building Windows is a vastly different task than most of you have
building drivers.

We do listen to your feedback.
Thanks!


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

If we’re making a Windows Build Environment wish list (David’s list is excellent) let’s please add:

  • The ability use “build” in a directory path with spaces, or at the very least, a helpful error message that indicates what the problem is.

  • A comprehensive change-list for build environment items with each release of the WDK

  • The ability to install the Win7 WDK on XP x64 systems.

  • Public TMF files for the check build of the OS and checked drivers

I’m sure there are more, and we can come up with them given time,

Peter
OSR

Hi All,

I have a query.
How can I install multiple WDK’s in the same machine ? I have 2 drivers.
driver1 → needs 10.0.18362.1 (a)
driver2 → needs 10.0.19041.0 (b)

if I install a and b. driver1 will no longer build.
With only a . driver 2 will not build.

(multiple SDK’s iam able to install. only WDK problem)

I tried
I tried installing the WDK in a different path. But not sure how to give that path.

Any help will be greatly appreciated.

Thanks,
Phani

You are posting to a thread that’s more than TEN years old.

This is not allowed.

Start a new topic.

Thread locked.