Visual Studio 2008 with DDK for beginners

Hi

I know there are 2 articles which explain how to use DDK with Visual Studio

1-) If You Build It - Visual Studio and Build Revisited (OSR)
http://www.osronline.com/article.cfm?id=104

2-)DDKBUILD - Integrating the Windows DDK with Visual Studio .Net
http://www.hollistech.com/Resources/ddkbuild/ddkbuild.htm

My
OS: Windows XP SP3
VS: Visual Studio 2008
DDK: C:\WinDDK\6000 (1.0.6000.0)

First
-I set up Include files directory search paths in VC++ Directories, Projects and Solutions, Options Dialog Box. So intellisense works well. OK.

Second

To be honest, I don’t understand Hollistech’s explanation of setting environment variable and corresponding command line flag.(first part of the article)

So, I tried what written in OSR’s article and .cmd file but it doesn’t work. It always shows Build successed, even there are errors in source code.

If you use VS2008 for Driver development. Can you please tell me:

How must i configure Environment Variables/Visual Studio/Makefile Project settings for XPSP3, WDK 6000 and VS2008? How did you configure your system?

Thanks…

xxxxx@gmail.com wrote:

To be honest, I don’t understand Hollistech’s explanation of setting
environment variable and corresponding command line flag.(first part
of the article)

  • “Multiple DDK Support” describes how to select the *active DDK* -
    necessary if you have more than one DDK/WDK installed at the same time.

Building a driver for Windows2000 (“W2K Build Target”) with the Windows
2000 DDK results in a different binary file than building the same
driver (for Windows2000) with WDK 6000.

  • “Variations on a theme” then explains how to select the “Build Target”
    for the (selected) active DDK.

Did you read the article to the end? I guess not, otherwise you would
have followed this link with the ddkbuild command line arguments:

http://www.hollistech.com/Resources/ddkbuild/ddkbuildhelp3_13.htm

And then of course the batch file itself is the primary source of
information. If you open the ddkbuild.bat file, you find that it
contains a help section.

(Example: With WDK 6000 installed, you set the environment variable
WLHBASE=. When building your driver for Windows XP, you
place -WLHXP on the DDKBUILD command line.)

To be honest, if now you still don’t understand how to use ddkbuild,
please re-consider strongly if you really want to (read: should) develop
drivers for any operating system, let alone for Windows.

Understanding the terms “environment variable” and “command line
argument” is - among a lot of other things - essential for building
Windows drivers.

Same goes for parsing program output (in this case the compiler/linkers)
to find errors and make them selectable in the VS output window.

Until you figure it out, you can use VS 2008 for editing your code (and
use IntelliSense), but BUILD your driver in the appropriate WDK “Build
Environment” (the WDK installs links for this purpose).

Or even better:
http://www.hollistech.com/Resources/ddkbuild/ddkbuildhelp3_14.htm

Which directly answers the OP’s question (XP WDK 6000):

*-WLHXP* indicates development system uses the WHLBASE environment
variable to locate WDK versions 6000 or 6001 and build X86 XP binaries
(optional.)

On Wed, Jul 30, 2008 at 8:13 AM, Hagen Patzke wrote:

> xxxxx@gmail.com wrote:
>
>> To be honest, I don’t understand Hollistech’s explanation of setting
>> environment variable and corresponding command line flag.(first part of the
>> article)
>>
>
>
> - “Multiple DDK Support” describes how to select the active DDK -
> necessary if you have more than one DDK/WDK installed at the same time.
>
> Building a driver for Windows2000 (“W2K Build Target”) with the Windows
> 2000 DDK results in a different binary file than building the same driver
> (for Windows2000) with WDK 6000.
>
>
> - “Variations on a theme” then explains how to select the “Build Target”
> for the (selected) active DDK.
>
>
> Did you read the article to the end? I guess not, otherwise you would have
> followed this link with the ddkbuild command line arguments:
>
> http://www.hollistech.com/Resources/ddkbuild/ddkbuildhelp3_13.htm
>
> And then of course the batch file itself is the primary source of
> information. If you open the ddkbuild.bat file, you find that it contains a
> help section.
>
> (Example: With WDK 6000 installed, you set the environment variable
> WLHBASE=. When building your driver for Windows XP, you
> place -WLHXP on the DDKBUILD command line.)
>
>
>
> To be honest, if now you still don’t understand how to use ddkbuild, please
> re-consider strongly if you really want to (read: should) develop drivers
> for any operating system, let alone for Windows.
>
> Understanding the terms “environment variable” and “command line argument”
> is - among a lot of other things - essential for building Windows drivers.
>
> Same goes for parsing program output (in this case the compiler/linkers) to
> find errors and make them selectable in the VS output window.
>
>
> Until you figure it out, you can use VS 2008 for editing your code (and use
> IntelliSense), but BUILD your driver in the appropriate WDK “Build
> Environment” (the WDK installs links for this purpose).
>
>
>
> —
> 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
>


Mark Roddy

OK. Thank you.
It works now…

Mark Roddy wrote:

http://www.hollistech.com/Resources/ddkbuild/ddkbuildhelp3_14.htm

Nice! (From the 3.14 batch file, not on the hollistech web site.)