Changes the instance COM class associated with this database class.
[Visual Basic 6.0] Sub AlterInstanceCLSID(
ByVal InstanceCLSID As IUID _
) As Empty
[Visual Basic .NET] Public Sub AlterInstanceCLSID ( ByVal InstanceCLSID As UID _ )
[C#] public void AlterInstanceCLSID ( UID InstanceCLSID );
[C++] public: void AlterInstanceCLSID ( UID InstanceCLSID );
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.
AlterInstanceCLSID will try to instantiate the COM 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 original COM class 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 COM class. 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.
IFeatureWorkspaceSchemaEdit Interface