VS Driver Intellisense: the Musical - Act 1 (of 3..or 4, maybe).
I was looking at the various ways I have my Visual Studio environment(s) setup and its behavior really depends on what I'm doing. So I figured I'd just do a series of how I have it all setup, and you guys / gals can use which one works the best for your needs. The easiest method is to create a "default" project that has what we need. I like to call this the $1.99 value meal Intellisense method. Which I just really made up right now..but it sounds good doesn't it? This is applicable to both VS 2005 and VS 2008. I'll save my editorials on some of these "features" for after the final act.
Then on the project settings UI that comes up next, select the application settings and make it an empty console project.
Now by default when you open a C/C++ file and add it to a project you get a level of Intellisense. So here I just grabbed 1394vdev.c file from the Windows XP DDK sources folder and drop it in to the project.
Which results in;
It's generating the Intellisense data from the header files in the same folder location as the source file. This is regardless of where your project file lives. So now all we have to do is point the project to the DDK headers we want to fill out the rest of the Intellisenseafragilisticexpealidociousness. Right click the project file select properties and you'll get this UI.
-WARNING-
There are TWO caveats here;
For some inane reason you HAVE to have a C/C++ file included in the project to get this C/C++ section in the Configuration Properties for this UI. Go figure, it's a C/C++ project already, am I going to drop a .cs in to it?
Second, you have to select the C/C++ section. It doesn't just come up by default. ;)
So >> C/C++ >> General and we get this:
In the Additional Include Directories section, select the ellipse button at the right and you'll get a new UI. Select the New Folder icon and then you can just type in locations.
Nice thing about this UI is it will drop down like the run command so a E:\WINDDK\will show you all the versions you have installed and so forth.
Okay out of this dialog, return to our sample file and you'll find...
And...
Now save it. You'll have to save it with the C/C++ files included in this method, but that's okay here. What you'll want to do next is then right click on the project and "Set as Default". Now every time you open a C/C++ file it will open with that project. Caveat here is; You'll have to add the file IN to the project to get Intellisense (File >> Move into >> your project name here, or just drag it over from the explorer location ) but it's a nice way to start a new driver with the DDK Intellisense already in tow. You can Save it off as a new name at your heart's desire.
If you have any questions on the $1.99 super value WDF/WDM Intellisense method, fire away. Next act will be a little more dynamic and involved, but it will allow you to port and migrate locations as well as do most of this from the command line! (HUZZAH)
*Currently playing - Rush, Between the Wheels