After you add your information model to Microsoft® 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, Repository calls CoCreateInstance, using as a parameter the ClassID you provided as a property of the class.
When Microsoft Repository 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, 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:
You can validate the property values or collections of each instance of a class by writing a special Automation server for that class.
Suppose your information model includes a class whose instances describe Microsoft® Word documents. Each instance describes a Word document, indicating specifically its title, subject, and author. Your class-specific Automation server must include special code to ensure that the values of the repository properties match the values of title, subject, and author stored in the Word file.
Suppose your information model includes a class whose instances describe modem pools. Each instance describes a particular modem pool, including its phone number. Your class-specific Automation server can include a method to automatically dial the number and establish a connection.
Note At this time, Microsoft Repository supports in-process Automation servers only (that is, dynamic-link libraries).