Example: Administrator Extension Installation

An SMTP gateway called PRO-SMTP is written by the fictitious company Pro-Electron, Inc. This SMTP gateway is installed to a server called PROTON running Microsoft Exchange Server, the gateway name PRO-SMTP is used as the Extension-Name, and the files are for the i386 (Intel) platform.

In this installation, the setup program copies both PROADMIN.DLL (the Administrator extension DLL) and PROADMIN.HLP (the Help file for the gateway’s extension property sheets) to \\PROTON\ADD-INS\PRO-SMTP\I386. The proxy generation DLL for this gateway is copied to the \\PROTON\ADDRESS\PRO-SMTP\I386 directory.

The gateway setup program displays a dialog box that lets the administrator choose the destination of the gateway’s executable file. This destination directory is saved in the Windows NT Registry on the gateway’s computer.

Note The Common-Name attribute of a directory object is a concatenation of the values used for Extension-Name and Platform. For example, the gateway in the preceding example would have a common name of PRO-SMTP:i386, and the Administrator program would recognize it only by this name. Therefore, your setup program must use the Extension-Name and Platform values consistently when it copies files and when it imports the gateway’s directory object.

The sample setup file GWSETUP.C first builds a list of files to be copied, then calls the CopyFilesInCopyList function of the Setup API in the Win32 SDK.