Peter,
Actually I do mean that. Of course I have no call to build a
standalone KMDF driver without XP support since the time the Win8 WDK first
became available, so it may be quite possible that your scenario does work
as you say, I just haven’t had any reason to go there.
When I asked the general question I was looking for guidance since all
the projects have been royal pains in the ass to setup. Now some specific
problems that I keep encountering with Visual Studio projects (whether they
be drivers or anything else), that maybe someone can help with, are list
below. Remember as I stated in my initial question, VS was essentially a
text editor for me until the latest WDK.
-
Is there some magic trick to get setting changes across all targets?
It seems like half the time I think I am doing it, it turns out that it only
worked on one architecture ./ one Windows version and only checked or free
but not both builds. -
Is there a handy list of environment variables I can always trust
for settings? It seems even if I am careful, I will get a call from a
client that we just did a minor change and everything is horribly broken.
I get the project back from them and it is littered with hard-coded paths
which means I have to take a long time to get things even build. -
Is there a good way to compare project files? With
SOURCES/Makefile.inc this was a standard source compare and everything was
pretty easy to spot. Now it is all XML and half the time it goes into my
clients system and comes back to me wildly reordered. Once I do find a
difference it can be damm hard to ensure that I fix the comparable settings
the same way.
I have more but these are generic to all projects even the
theoretically simple case that Peter gives below (I have done the below with
applications, if not with a driver).
Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@osr.com
Sent: Thursday, December 05, 2013 12:22 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Approaches for converting DIRS/SOURCES projects to WDK
8+
(Emphasis in the above is mine)
SURELY you don’t mean that. SURELY you’ve joined the Dr. Newcomer school of
hyperbole and histrionics here.
“The simplest Visual Studio driver project”? Seriously?
How’s this:
-
Run Visual Studio
-
Do File… New… Project.
-
Select Visual C++, Windows Driver, WDF
-
Select Kernel Mode Driver (KMDF)
-
Click OK.
Done.
I *think* that’s “the simplest VS driver project” – I think.
I just did it and timed it. Less than one minute, total. This includes the
time it took VS 2013 to load on my machine.
OH, wait… you meant create your OWN driver project with files you already
HAVE? Well, that’s different:
1), 2), 3)… same as above
-
select Kernel Mode Driver, Empty (KMDF)
-
Click OK
-
In Solution Explorer, right-click “Source Files”… Click Add. Select
your file. -
Repeat for other files in your project (selecting “Header Files” or
“Source Files” as appropriate) -
Under “Driver Files” edit the provided INF or substitute your own.
Done.
I just did this on my machine and timed it. Less than 3 minutes, total.
IF YOU HAVE A COMPLEX PROJECT it WILL take some time to convert. But how
can this not be the case? You’re dramatically changing build systems, from
one that was thrown together with existing tools by Steve Woods in 1989 to
something that, you know, is relatively modern, well-documented, and
flexible. It’s going to take time.
I GET that it’s new and you don’t know how to use it. Shit, *I* barely know
how to use it. I have to constantly refer back to SNoone’s article in The
NT Insider (http://insider.osr.com/2013/ntinsider_2013_01.pdf) to remember
all those “elements”… but I rarely have to. I just follow the steps I
outlined above.
Really.
And (as I’ve said before) our clients (from the largest to the smallest who
don’t know anything about drivers) LOVE it. They all have Visual Studio.
They all know how to use it, more or less. I just tell them “add in the
DMK, open the solution, and rock on” – FAR easier than explaining which
command prompt window to open and type “bcz”…
And, finally: NO. Though it generally works for me, perhaps with a tweak or
two, DO NOT use the converter for anything other than “I want to try this
out” type of builds. The projects it produces are NOT a good long-term
solution, IMHO.
Peter
OSR
NTDEV is sponsored by OSR
Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
OSR is HIRING!! See http://www.osr.com/careers
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