Meta Data Services Programming

Choosing an Automation Server for a Class

After you add your information model to a repository, you can run your tool. Periodically, your tool will invoke the CreateObject method to create an instance of one of the classes of your information model. CreateObject must create a run-time object (that is, an Automation object). To create the run-time object, the repository engine calls CoCreateInstance, using as a parameter the ClassID you provided as a property of the class.

When the engine calls CoCreateInstance with the ClassID, the system registry is checked to determine which Automation server contains the required class factory. For most classes in your information model, a generic Automation server for repository objects, Repodbc.dll, suffices. To use the generic server as the Automation server for a class, you can either do nothing, or you can specify Repodbc.dll in the entry for that class in the registry.

Although Repodbc.dll suffices as the Automation server for most repository classes, you will occasionally create a class whose instances require special treatment. For example:

See Also

Creating Type Information Programmatically

Information Model Creation Issues