Creating the Directory Object

Your server application needs to be recognized by other programs such as the Microsoft Exchange Server Administrator program. Therefore, the setup program must create a new object for your application in the Microsoft Exchange Server directory and provide initial object attribute values. The setup program can set most of these values as defaults, while others (such as the server name) can be specified by the user through a setup dialog box. When you add a new Mail-Gateway object or a new Mailbox-Agent object to the directory, an associated mailbox and folder hierarchy is created in the information store.

To create the object that represents the application in the directory, your setup program calls the BatchImport and DAPIWrite functions. The setup program also uses these functions to set the object's attribute values. Directory access functions are described in Directory Operations.

To know how to import a directory object, the setup program first gathers configuration information by reading default data from the application's header files and using default values that correspond to the type of application being installed. It also copies extension data from the extension data file on the distribution medium. For more information about extension data, see Initializing the Extension-Data Attribute.

The setup program presents dialog boxes to the administrator for entering attribute values. For example, a gateway's setup program would prompt the administrator for the address space serviced by the gateway. For an example of code that prompts administrators for information, see the ShowInstallDlg function call in GWSETUP.C. It requests, for example, a display name to use for the application being installed.