microsoft / Windows-driver-samples

This repo contains driver samples prepared for use with Microsoft Visual Studio and the Windows Driver Kit (WDK). It contains both Universal Windows Driver and desktop-only driver samples.
Microsoft Public License
6.79k stars 4.89k forks source link

ComponentizedApoSample.inx: HKR,Classes\CLSID versus HKR,AudioEngine #1056

Closed namelessmasses closed 7 months ago

namelessmasses commented 8 months ago

In the sample .inx,

https://github.com/microsoft/Windows-driver-samples/blob/6971eb69270c614964808f0409fe0b479da51270/audio/sysvad/TabletAudioSample/ComponentizedApoSample.inx#L59

if CLSID is now Classes\CLSID shouldn't the AudioEngine location be

HKR\Classes\AudioEngine\...

since they were peers under HKCR?

kkotte commented 7 months ago

This is by design. Under HKR, CLSID and AudioEngine are not peers.

namelessmasses commented 7 months ago

Thanks for the response.

Just curious about that design. Do you have any knowledge about the change?

I'm specifically wondering

  1. Why change them from being peers?

  2. What is it that actually has knowledge of how to find the CLSID and AudioEngine properties under the software key? Will this only work when using AudioProcessingObject setup class? I.e., if these are in the base driver INF (Media setup class) then the audio engine won’t find them.

[Edited for formatting]

kkotte commented 7 months ago

HKR entries are saved in a location relative to the device, and COM registrations relative to a device have a different layout for registrations.

Its the COM subsystem that has knowledge of how to find the COM registration. The Audio stack tells COM which device is of interest when searching for these registrations. Currently, the audio stack will instruct COM to look for COM registrations relative to only the AudioProcessingObject setup class (and not the MEDIA class).

namelessmasses commented 7 months ago

@kkotte thank you! My mistaken reference there with "audio engine" including COM although the two are of course distinct.

Now I'm wondering for how long Windows will support existing INFs pre-WDK 10.0.22621.2428 that still use HKCR directly to registry CLSID and AudioEngine properties.

namelessmasses commented 7 months ago

Closed as I have the primary question(s) answered. If anyone has information how long existing HKCR INFs will be accepted by pnputil/PnPManager please comment.