An inf in the hand is worth two in the bush.

A laurel and hearty hello to all of you (2 points if you get the reference).

Before I start on the meat of the post, I want to cover something that came up in conversation recently in regards to creating hybrid driver stacks using UMDF;  Your kernel mode object does not have to be KMDF.  You can use an existing WDM driver just as easily with out any modifications to the driver.

Now, on w/ the show, I wanted to cover some really geeky code stuff in this post, but it's not quite ready for prime time so you'll have to suffer with a post about inf files.

The first hurdle to really cover in getting this sample driver off the ground is figuring out what goes where in our good friend, the INF file.  For the 1394 virtual device hybrid driver, I'm going to install the kmdf stub, then attach the umdf stub as an upper filter to that "device".  I am breaking the inf file included w/ the sample in to sections to hopefully make it easier to read.  And in doing so it should show better where all the installation magic happens.  So the first thing to do is the normal stuff for installing the kmdf1394vdev.sys file, your standard inf will serve as a basis.  We just need to set Redirector / Reflector / Redefelctor object as an upper filter to that device (yes, I fully expect somebody to talk to me about the additional name *g*).

We'll add the necessary registry and service entries to the non-WDF installation section, so I'm only going to highlight the additions / changes to a normal inf and I'll be using the model of the UMDF being an upper filter driver;

[kmdfvdev.NT.HW]

AddReg=kmdfvdev_AddReg

[kmdfvdev.NT.Services]

AddSerivce=umdfvdev, ,umdfvdev_ServiceInstall

 

[kmdfvdev_AddReg]

; Load the UMDF Redirector as our upper filter

HKR,,"UpperFilters",0x00010008, "WUDFRd"

 

[umdfvdev_ServiceInstall]

;Make sure to create a unique display name for the redirector service

DisplayName = %WUDFRd_SvcDesc%

ServiceType = 1

StartType = 3

ErrorControl = 1

ServiceBinary = %12%\WUDFRd.sys

Pretty straight forward so far, next are the additions for the WDF installer section;

[kmdfvdev.NT.Wdf]

UmdfService=umdfvdev,umdfvdev_Install

UmdfServiceOrder=umdfvdev

[umdfvdev_Install]

UmdfLibraryVersion=$UMDFVERSION$

DriverCLSID= ;generate a class GUID

ServiceBinary=%12%\UMDF\umdfvdev.dll

*Currently Playing - Spock's Beard As Far as the Mind Can See: Pt. 3 They Know We Know