[wdmaudiodev] Re: Questions about "name Guid" in MSVAD "simple" example

  • From: Tim Roberts <timr@xxxxxxxxx>
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Mon, 9 Jul 2012 10:07:01 -0700

Paul Titchener wrote:
> I know enough about driver .inf files and driver source code just to
> be dangerous so far, I’m using the msvad “simple” example as my
> starting point and I’m trying to understand some things about it.
>  
> In the simple.h include file for the driver, there are the lines below:
> ...
> [MSVAD_Simple.AddReg]
> . . .
> HKLM,%MediaCategories%\%Simple.NameGuid%,Name,,%Simple.Name%
>  
> and
>  
> [Strings]
> . . .
> MediaCategories="SYSTEM\CurrentControlSet\Control\MediaCategories"
>  
> Simple.NameGuid="{946A7B1A-EBBC-422a-A81F-F07C8D40D3B4}"
> Simple.Name="MSVAD (Simple)"
>  
> What are all these lines accomplishing and is this something I need to
> keep in a new driver derived from the “simple” example?

The Control\MediaCategories key is just a way to assign human-readable
names to things identified by GUIDs, such as filters, pins, media types,
and so on.  In this particular case, this GUID is returned in the
KSPROPERTY_GENERAL_COMPONENTID property, which can be used by user
interfaces to get a real name for your driver.  Support of that property
is optional.  If you do choose to keep supporting it, you should choose
a new GUID.

> If I need to keep this, Is that GUID a standard fixed one that has
> some meaning as a “name guid” or am I supposed to replace it with a
> different unique one?

That GUID is specific to that particular name.  You should choose a new one.

-- 
Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.

Other related posts: