Add Interfaces to Each Class

Meta Data Services Programming

Meta Data Services Programming

Add Interfaces to Each Class

Each of the classes in your information model exposes one or more interfaces. Add a new interface to a class by creating an instance of the InterfaceDef class.

When you create a custom interface, you must avoid assigning a dispatch ID of 1000 to the interface. IRepositoryDispatch::get_Properties reserves this value for itself.

To create a new interface definition

  • Use the CreateInterfaceDef method of the IClassDef interface that is exposed by your ClassDef object.

    Be sure the interface identifier that you supply as an input parameter to this method matches the globally unique identification (GUID) that has been assigned to the interface.

    Note  Among the interfaces you create for your information model, you must include an interface that the ReposRoot class implements. You need this interface and an attendant relationship type to enable navigation to the objects that will populate your information model. For more information about why you need this interface, see Information Model Creation Issues.

See Also

Add Methods to Each Interface

Add Properties to Each Interface

Add Relationship Types and Pairs of Collection Types

ClassDef Object

Creating Type Information Programmatically

IClassDef Interface