OSRLogo
OSRLogoOSRLogoOSRLogo x Seminar Ad
OSRLogo
x

Everything Windows Driver Development

x
x
x
GoToHomePage xLoginx
 
 

    Wed, 13 Dec 2017     115635 members

   Login
   Join


 
 
Contents
  Online Dump Analyzer
OSR Dev Blog
The NT Insider
Downloads
ListServer / Forum
Driver Jobs
  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

Building Within Visual Studio (IDE)

There's nothing wrong with building drivers from within Visual Studio. But if you do this, do it right or don't do it at all.

The only way to properly build drivers from within the IDE is to use what Visual Studio calls an "external build procedure" to compile and link your drivers using the tools provided with the DDK. That means you run BUILD, just like you would from the command line, but directly from within Visual Studio. You get your browse files, you get your syntax completion, and you get a build environment that's supported.

It is either arrogance or unadulterated stupidity to attempt to recreate the DDK's build environment by setting up all the options, defines, and paths within your own Visual Studio project. Why would you do this, when you can do it as described above and get the same result correctly? Not only trying to define your own environment results in using the wrong compiler in XP, but you'll also use the wrong linker in Win2K. Also, note that defines, paths, and options actually can change from release to release of the DDK.

So, if you want to use the IDE, do it right or use BUILD.

Related Articles
Don't Define NT_UP
Just Checking - Installing a Partially Checked Build
Taming the Beast - The Windows 2000 Build Environment
Build Tricks: Checked and Free Revisited
Save the Environment! - Integrating Build and Developer Studio
If You Build It - Visual Studio and Build Revisited
Warning: Beware winioctl.h from Visual C/C++ Version 6.0
New Build Definitions?
Definition of DDKBUILDENV Changed in Windows XP®
Definition of “CPU” Environment Variable Changed

User Comments
Rate this article and give us feedback. Do you find anything missing? Share your opinion with the community!
Post Your Comment

"Well, no."
Using the procedure you outlined is BAD ENGINEERING PRACICE. It's precisely what we're trying to warn people about.

If you use the process you describe, you've got the switches and settings right for ONE version of the DDK, and now you've got those switches and settings embedded in your VS project. What happens when a new DDK is released, and those switches CHANGE? Suppose the switches change (as they do) from build environment to build environment??

No, dude, bad idea. THAT's why we describe this process.

10-Mar-05, Peter Viscarola


"building driver with Visual Studio"
'The only way to properly build drivers from within the IDE is to use what Visual Studio calls an "external build procedure" to compile and link '

Not true. Set the project settings to ignore default directories for compile and link. Set all other neccessary switches. In Tools-Options-Directories-Executable Files, add a path to the DDK bin and move it to the top of the list. Copy BSCMAKE.EXE to the DDK bin dir.

You can now build drivers with browse info etc from VS.

Rating:
10-Mar-05, matt sykes


Post Your Comments.
Print this article.
Email this article.

Writing WDF Drivers I: Core Concepts
LAB

Nashua (Amherst), NH
15-19 May 2017

Writing WDF Drivers II: Advanced Implementation Techniques
LAB

Nashua (Amherst), NH
23-26 May 2017

Kernel Debugging and Crash Analysis
LAB

Dulles (Sterling), VA
26-30 Jun 2017

Windows Internals and Software Driver Development
LAB

Nashua (Amherst), NH
24-28 Jul 2017

 
 
 
 
x
LetUsHelp
 

Need to develop a Windows file system solution?

We've got a kit for that.

Need Windows internals or kernel driver expertise?

Bring us your most challenging project - we can help!

System hangs/crashes?

We've got a special diagnostic team that's standing by.

Visit the OSR Corporate Web site for more information about how OSR can help!

 
bottom nav links