Welcome to MSDN Blogs Sign in | Join | Help

Determining WDF runtime and client versions

What a long, strange trip, it was, getting to WinHEC!  I waited for a shuttle to the airport at my apartment, and the rain [which was fairly heavy] turned into hail!  But by the time we got near the airport, everything was dry.

Well, LA is probably still LA (I lived in El Segundo for about a year 6 years ago, and of course went to school in Pasadena, so I'm not a total loss], so that's enough travelogue.

UMDF

Easy- Peter and his team obviously planned ahead.  There is an exported data item linked into each driver and in one of the framework binaries.  So LoadLibrary and GetProcAddress, and you're there.  The data is three ULONGs [IIRC, as I'm not about to carry Windows source on my laptop to WinHEC without a better reason than a desire to blog]- major version, minor version and "SP level".

KMDF runtime

I won't say Doron and his peers didn't plan ahead- I believe it was more a case of having more important problems to solve at the time...  But I did mention it, so I might as well face it.

Again, I'm going to have revisit a few details again, later.  This is my recollection [and it will be pretty close]:

  • KMDF 1.0 had nothing to identify it.
  • KMDF 1.1 and 1.5 have a resource in the disk file that identifies major version, minor version, and build number, similar to the UMDF version info described above.  LoadLibraryEx (as datafile) and the usual FindResource, etc. route.
  • As part of our installation improvements in KMDF 1.7, the runtime now also records its version in the registry under its software key when it is loaded, and removes it when it unloads.  That's why the WdfVerifier image I showed here said "In Memory".  I like this because it also works remotely (and I'm not going to inspect binaries remotely).

So, I first look for an in-memory version, as that is the most reliable.  If I am remote, then the only other thing I can do is look at the registered OS version information.  If it is Windows Vista, I assume it must be KMDF 1.5 [because 1.7 would tell me it is in memory, as Vista has running inbox KMDF drivers]- the message indicates this, although how I say it is by inference escapes me.  Otherwise, it is 1.5 or below, but I can't tell- I don't remember the message, but I do hope I changed it from my original "Can't tell- you tell me!".

If it is local, then when I first scan all driver binaries, I pick out the runtime, and examine the version information just as I describe above.

KMDF client

This is the fun one for me, so I'm going to save it for a later post- it's time to get dressed and find that shuttle to the convention center, so I can spend a day in WinHEC [oh, the pun potential for that one...].

No tunes today- wonder if the WDK folks I now sit amongst are enjoying time away from the endless noise emanating from my environs!

Published Wednesday, November 05, 2008 6:29 AM by BobKjelgaard
Filed under: , ,

Comments

No Comments
New Comments to this post are disabled
 
Page view tracker