Registering APOs

Hello everyone! Im’ developing a Windows APO (Audio Processing Object). And I’m researching what would be the best way to install it on a system. From what I found there are a couple of ways this could be done:

Manually registering the APO: Similar software like Equalizer APO register the APO manually in every required place in the registry. I don’t think this is the best way, but it is a possibility.

Using ATL and manual registration: By using ATL a lot of the COM object registration boilerplate can be reduced, but this still leaves the need to manually register APO properties under HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AudioEngine\AudioProcessingObjects.

I imagine this could be done inside the DllRegisterServer and DllUnregisterServer functions to have the APO be registered/unregistered all at once.

Using registry files: I’ve seen some of the sysvad APO examples use .reg files to handle some kind of COM registration/unregistration, though I’m not entirely sure what said files do.

Using a driver package: The APO examples from sysvad include an example .inf file that seems to register the APO in all the necessary places. The thing is that in the example the APOs are meant to be bundled with an audio driver. So I don’t know if it’s possible to create a driver package just for one APO, and if it is possible, it seems like an overcomplicated approach.

My question is, what is the best way to handle the APO registration/unregistration process? Which one would you recommend?

I know that third party APOs are not officially supported by Windows, and that there is now official way to register an APO without it being bundled with an audio driver. I’m just trying to choose the best approach I can.

Any recommendations would be greatly appreciated, thank you!

The normal way to install COM components used to be to implement DllRegisterServer, and then to have your installer framework of choice add a row to the SelfReg table in your MSI. This is no longer recommended because there are some security and reliability impacts

The current recommended way to register COM components is to determine the required registry keys (there are several ways to do this) and include the registry keys directly in the MSI registry table.

The direction from Microsoft has always been that APOs are a part of the hardware, and should be installed in the INF file for audio hardware, and not as a simple COM component. They aren't supposed to be managed separately.

However, if you see it in the sample drivers, then it's "approved".

I’ve finally decided to use ATL to register the APO. I figured I could just add the necessary keys in the .rgs files along with the COM object keys, and let ATL take care of the APO registration/unregistration.

It might not be the best solution but it sure is practical, and I don’t have to deal with .inf files.