Installing an Admin-Extension Object
If your gateway uses custom property sheets to present data to administrators, its setup program must install them. This means that it must install the Admin-Extension object in the directory and copy the Administrator extension DLL and any other necessary files to specific locations on the server. For information about copying files, see Copying Files Onto Disk.
To install an Admin-Extension object
-
Verify whether the Admin-Extension object already exists in the directory, using MAPI functions or the BatchExport function. See Finding an Object in the Directory.
-
If the Admin-Extension object does not exist, skip to step 4. If the object does exist, check its version. This is a multistep procedure that uses calls to the HrGetFileVersionInfo, HrAdminExtensionExists, and HrGetAdminExtensionVersion functions and to the Win32 VerQueryValue function.
-
If the installed Admin-Extension object is newer than the one to be installed, use a dialog box to ask the user whether to overwrite the installed object with the older one on the distribution medium. If the user answers Yes, proceed with step 4. If the user answers No, end the installation of this Admin-Extension object. If other Admin-Extension objects need to be installed, begin again at step 1.
-
Call GUIDGEN.EXE to generate an extension name, or make up a unique extension name for the Admin-Extension object.
-
If there is already an Admin-Extension object with the same name as the one you are installing, remove the installed one by calling the HrRemoveAdminExtension function and passing the extension name of the Admin-Extension object.
-
Copy the files associated with the Admin-Extension object to the Microsoft Exchange Server computer. See Files Used with Directory Objects.
-
Create the new Admin-Extension object with the BatchImport function or DAPIWrite function. Use the GUID created in step 4 for the extension name of the object. If other Admin-Extension objects need to be installed, begin again at step 1.
For sample code that performs these steps, see the GWSETUP.C file in the \BKOFFICE\SAMPLES\EXCHANGE\GWSETUP directory.
For general information about working with Administrator extensions, see Administrator Program Extensions. For information about setting the attribute values of the Extension-Data attribute, see Initializing the Extension-Data Attribute.