Registering classes in COM component categories


Summary This topic gives an overview of the different ways you can register a .NET component in a specific category.

In this topic


About registering classes in COM component categories

Much of the extensibility of ArcGIS relies on Component Object Model (COM) categories, for example, all ArcMap commands and tools are registered in the ESRI Mx Commands component category.

Methods for registering .NET components

The following are various methods for registering a .NET component in a category:
  • Add code to your .NET classes that automatically registers the classes in a component category when the component is registered with COM.
  • Use the Customize dialog box in ArcGIS applications to add commands, tools, and toolbars. Click the Add from File button on this dialog box to browse for the type library (.tlb) file created for your customization, then open it, which allows the ArcGIS Framework to add selected classes in the type library to the applicable component category.
    • This method is beneficial if you want to use an existing compiled component that contains command items (commands, tools, and toolbars) but does not have automatic registration code.
For .NET components, select the type library instead of the .dll file.
  • Use the Component Categories Manager (categories.exe) utility. In this case, select the applicable component category in the utility, browse for the type library, and choose the appropriate class. The utility can be found in the bin folder of your ArcGIS Desktop installation.
    • This method can be beneficial if you want to use an existing compiled component that contains custom classes but does not have automatic registration code.
Using categories.exe does not require the esriRegAsm (available at ArcGIS 10) step to be completed. Although it can register for both ArcGIS Desktop and ArcGIS Engine products, it is only available with an ArcGIS Desktop installation. In addition, the type library file (.tlb) needs to live beside the .dll file from which it was created.
The actions performed are essentially the same, regardless of the category registration method you choose.


See Also:

How to register COM components
ESRIRegAsm utility




Additional Requirements
  • Components must be registered with COM before they can be registered to component categories.