I could really learn to like KMDF, I think. I won’t have hardware for
another week yet, but the driver is ready to go. For a DMA-based PCI
capture device, I estimate that it has taken about a third of the time
that a traditional WDM driver would have.
I love that the APIs actually have a consistent naming scheme. When I
needed to get a device object from a file object, I could guess without
knowing beforehand (successfully) that I needed WdfFileObjectGetDevice.
I love that all of the objects can have context structures, in an
orderly and reasonable way, with well-defined cleanup semantics. That’s
a fabulous concept. I was trying to figure out where to tuck some
global data, since there was no driver context, when it finally occurred
to me that I could just ADD one to my WDFDRIVER. Simple.
I love that the hyperlinks in the documentation are so thorough. The
KMDF doc is great for browsing; one page leads to a few more, which lead
to a few more, etc. I find that a great way to learn, and I know that
it is a bear to set up a document that way.
I love that callbacks for which the return code is not useful are
prototyped to return void. There were many cases in WDM where it was
not clear whether an error return would ever be seen by anyone.
This is Good Stuff.
I would love to see a page in the doc that summarizes the order in which
the device/driver callbacks are called, and the triggers for those
callbacks. I’ve seen such a page in a PowerPoint slide from a couple of
years ago, but I never remember the URL.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.