<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>My travels with WDF : Spock's Beard</title><link>http://blogs.msdn.com/888_umdf_4_you/archive/tags/Spock_2700_s+Beard/default.aspx</link><description>Tags: Spock's Beard</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>An inf in the hand is worth two in the bush.</title><link>http://blogs.msdn.com/888_umdf_4_you/archive/2007/03/28/1978871.aspx</link><pubDate>Wed, 28 Mar 2007 19:53:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1978871</guid><dc:creator>patman</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/888_umdf_4_you/comments/1978871.aspx</comments><wfw:commentRss>http://blogs.msdn.com/888_umdf_4_you/commentrss.aspx?PostID=1978871</wfw:commentRss><description>&lt;P&gt;A laurel and hearty hello to all of you (2 points if you get the reference).&lt;/P&gt;
&lt;P&gt;Before I start on the meat of the post,&amp;nbsp;I want to cover something that came up in conversation recently in regards to creating hybrid driver stacks using UMDF;&amp;nbsp; Your kernel mode object does not&amp;nbsp;have to be KMDF.&amp;nbsp; You can use an existing WDM driver just as easily with out any modifications to the driver.&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;The first hurdle to really cover in&amp;nbsp;getting this&amp;nbsp;sample driver off the ground is figuring out what&amp;nbsp;goes where in&amp;nbsp;our good friend, the INF file.&amp;nbsp;&amp;nbsp;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".&amp;nbsp;&amp;nbsp;I am breaking the inf file included w/ the sample in to&amp;nbsp;sections to hopefully make it easier to read.&amp;nbsp; And in doing so it should show better&amp;nbsp;where all the installation magic happens.&amp;nbsp; So&amp;nbsp;the first&amp;nbsp;thing to&amp;nbsp;do is the normal stuff for installing the &lt;EM&gt;kmdf1394vdev.sys&lt;/EM&gt; file, your standard inf will serve as a basis.&amp;nbsp; We just need to&amp;nbsp;set Redirector / Reflector / Redefelctor&amp;nbsp;object as an upper filter to that device (yes, I fully expect somebody to talk to me&amp;nbsp;about the&amp;nbsp;additional&amp;nbsp;name *g*).&lt;/P&gt;
&lt;P&gt;We'll add the necessary registry and service entries to the non-WDF installation section, so I'm only going&amp;nbsp;to highlight the additions / changes to a normal inf&amp;nbsp;and I'll be using the model of the UMDF being an upper filter driver;&lt;/P&gt;
&lt;DIV&gt;
&lt;P&gt;&lt;FONT size=2 face="Courier New"&gt;[kmdfvdev.NT.HW]&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face="Courier New"&gt;AddReg=kmdfvdev_AddReg&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face="Courier New"&gt;[kmdfvdev.NT.Services]&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face="Courier New"&gt;AddSerivce=umdfvdev, ,umdfvdev_ServiceInstall&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face="Courier New"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face="Courier New"&gt;[kmdfvdev_AddReg]&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face="Courier New"&gt;; Load the UMDF Redirector as our upper filter&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face="Courier New"&gt;HKR,,"UpperFilters",0x00010008, "WUDFRd"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face="Courier New"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face="Courier New"&gt;[umdfvdev_ServiceInstall]&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face="Courier New"&gt;;Make sure to create a unique display name for the redirector service&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face="Courier New"&gt;DisplayName = %WUDFRd_SvcDesc%&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face="Courier New"&gt;ServiceType = 1&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face="Courier New"&gt;StartType = 3&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face="Courier New"&gt;ErrorControl = 1&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face="Courier New"&gt;ServiceBinary = %12%\WUDFRd.sys&lt;/FONT&gt;&lt;/P&gt;&lt;/DIV&gt;
&lt;P&gt;Pretty straight forward so far, next are the&amp;nbsp;additions for the WDF installer section;&lt;/P&gt;&lt;FONT face="Courier New"&gt;
&lt;DIV&gt;
&lt;P mce_keep="true"&gt;[kmdfvdev.NT.Wdf]&lt;/P&gt;
&lt;P mce_keep="true"&gt;UmdfService=umdfvdev,umdfvdev_Install&lt;/P&gt;
&lt;P mce_keep="true"&gt;UmdfServiceOrder=umdfvdev&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;[umdfvdev_Install]&lt;/P&gt;
&lt;P mce_keep="true"&gt;UmdfLibraryVersion=$UMDFVERSION$&lt;/P&gt;
&lt;P mce_keep="true"&gt;DriverCLSID= ;generate a class GUID&lt;/P&gt;
&lt;P mce_keep="true"&gt;ServiceBinary=%12%\UMDF\umdfvdev.dll&lt;/FONT&gt;&lt;/P&gt;&lt;/DIV&gt;
&lt;P&gt;*Currently Playing&amp;nbsp;- Spock's Beard &lt;EM&gt;As Far as the Mind Can See: Pt. 3 They Know We Know&lt;/EM&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1978871" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/888_umdf_4_you/archive/tags/UMDF/default.aspx">UMDF</category><category domain="http://blogs.msdn.com/888_umdf_4_you/archive/tags/KMDF/default.aspx">KMDF</category><category domain="http://blogs.msdn.com/888_umdf_4_you/archive/tags/Spock_2700_s+Beard/default.aspx">Spock's Beard</category></item></channel></rss>