The VB Project

Initial Setup

Open Visual Basic. Go to the Tools>Options menu, and verify that Require Variable Declaration is checked. (Visual Basic does not check this option by default.)

Create a new ActiveX DLL project. This automatically creates a project file and a class file.

Add References

Go to the Project>References menu, and from the Available References dialog, select “PITimeServer 1.1 Type Library.” This library defines the interfaces ITimeInterval and ITimeIntervals, which your objects will implement.


  1. Add two more class modules to your project, for a total of three. You can do this from the toolbar or from the Project menu.
  2. Name the project and the three classes. For this example, you should name the project PlantDayAndShiftServer, and name the class modules Intervals, PlantDay, and Shift.
  3. Go to the Properties window to set the Instancing property of the three classes. The registration utility requires that your interval server contain only one creatable class—the class that implements ITimeIntervals. Verify that the Intervals class is set to 5—MultiUse (the default), and set the other two classes to 2—PublicNotCreatable.

Save Your Project

After saving, the project window should look like this.

Enabling Operational Intelligence