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


IClassSchemaEdit.AlterInstanceCLSID Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (GeoDatabase)  

IClassSchemaEdit.AlterInstanceCLSID Method

Changes the instance COM class associated with this database class.

[Visual Basic .NET]
Public Sub AlterInstanceCLSID ( _
    ByVal InstanceCLSID As UID _
)
[C#]
public void AlterInstanceCLSID (
    UID InstanceCLSID
);
[C++]
HRESULT AlterInstanceCLSID(
  IUID* InstanceCLSID
);
[C++]

Parameters InstanceCLSID [in]
InstanceCLSID is a parameter of type IUID

Product Availability

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

Description

The AlterInstanceCLSID is used to change the behavior class for an object class in the Geodatabase. For example, you may have a class that stores simple feature objects and you want to change it to implement a custom object that you have developed. You use the AlterInstanceCLSID to do so.

Remarks

AlterInstanceCLSID will try to instantiate the object for the CLSID that you provide. If it fails to instantiate it, the method will fail. Therefore, you must have the DLL which has the implementation of your custom object registered on your system before you call AlterInstanceCLSID.

Before you QI for AlterInstanceCLSID, you will have had to open the object class. So, if this fails because you no longer have the DLL registered on your system, then you must use the IFeatureWorkspaceSchemaEdit interface to alter the instance CLSID.

No additional checking is done beyond instantiating the instance object. If the object class does not have the fields required for supporting the custom object then your class may not function with its new instance CLSID.

See Also

IClassSchemaEdit Interface | IFeatureWorkspaceSchemaEdit Interface

.NET Related Topics

How to create a dynamic geocoded feature class