Search code examples
comc++builderregistrykey

C++ Builder: How to add "Implemented Categories" key to registry?


I try to implement a COM plugin for a 3rd party program. It requires an "implemented categories" key in the windows registry, otherwise it does not find the plugin. The key should be placed here:

HKEY_CLASSES_ROOT/CLSID/<Your CLSID>/Implemented Categories/KEY-TO-BE-REGISTERED

I would like to register the key at the time when my COM object (DLL/EXE) is registered.

This key is a very similar GUID like CLSID, LIBID, etc., in the COM world

Implemented-Categories attribute

But so far I haven't found any solution or description.

C++ Builder made a transition from ATL to DAX a few years ago, so old ATL or Visual Studio references are not really helpful.

So the question is: how can I register an "Implemented Categories" key in C++Builder, in the DAX era, in a straight forward way?


Solution

  • Unlike ATL, DAX does not natively support category registrations (see QC #88043). However, you can override the virtual UpdateRegistry() method in your COM object's implementation class and have it create the necessary Registry key when the Register parameter is true.