This document is archived and information here might be outdated.  Recommended version.


IComponentCategoryManager.SetupObject Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > System > ESRI.ArcGIS.esriSystem > Interfaces > IC > IComponentCategoryManager Interface > IComponentCategoryManager.SetupObject Method
ArcGIS Developer Help

IComponentCategoryManager.SetupObject Method

Installs or uninstalls the given object into the given category.

[Visual Basic .NET]
Public Sub SetupObject ( _
    ByVal pathname As String, _
    ByVal obj As UID, _
    ByVal category As UID, _
    ByVal install As Boolean _
)
[C#]
public void SetupObject (
    string pathname,
    UID obj,
    UID category,
    bool install
);
[C++]
HRESULT SetupObject(
  BSTR pathname,
  IUID* obj,
  IUID* category,
  VARIANT_BOOL install
);
[C++]
Parameters
pathname [in]

pathname is a parameter of type BSTR obj [in]
obj is a parameter of type IUID* category [in]
category is a parameter of type IUID* install [in]
install is a parameter of type bool

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

PathName is a string representing the full path and filename of the DLL containing the objects you want to register/unregister in a category.

obj is an IUID object representing the unique identifier of the object you want to register/unregister in a category. This UID would be the ID of a class.

Category is an IUID object representing the unique identifier of the category in which you are registering/unregistering the objects.

install specifies whether you are registering (True) or unregistering (False) the objects.

Remarks

The SetupObject method provides a means of registering a specific object stored in a DLL.

For example, you can have a single DLL that contains many commands (objects that implement ICommand). If you want to register only one of the commands in this DLL with the commands category for ArcMap, you can set obj to be the UID of your command and set Category to be the UID of the ESRI Mx Commands category. By calling SetObject with these settings, only that specific command will be registered. If you want to register all the commands in the DLL you can either call SetupObject a number of times (once for each command) or use the Setup method instead. Setup allows you to register many objects at the same time with a single call.

See Also

IComponentCategoryManager Interface