Platform SDK: Exchange Server |
To add property pages to a directory object, you install an Administrator extension DLL by adding and configuring an Admin-Extension object in the directory. You assign a name to this Administrator extension by setting its Extension-Name attribute. You may, for instance, set it to match the service name. The Administrator program builds a Common-Name attribute for the extension from the Extension-Name attribute and the hardware platform designation, in this way:
<extension-name>:<hardware-platform>
For example, you may assign the name GWSample to the Extension-Name attribute for a service called GWSample. If the platform is i386 (Intel), the Common-Name is set to GWSample:i386.
An Administrator extension DLL is associated with a directory object when the <extension-name> part of the Admin-Extension object's common name is written into the Extension-Name attribute of the directory object. The name of the extension DLL file is recorded in the Admin-Extension-DLL attribute of the Admin-Extension object.
The installation program also must copy the new Administrator extension DLL into a subdirectory of the ADD-INS directory share, which is created when Microsoft Exchange Server is installed. This subdirectory is determined as follows:
\\SERVER\ADD-INS \<extension-name>\<hardware-platform>
When the MS Mail Connector is installed, it creates an Admin-Extension directory object in the Add-Ins container, with the common name MS:i386. Through its Admin-Extension-DLL attribute, this object points to a DLL file called CONADMIN.DLL in the \\SERVER\ADD-INS\MS\I386 directory on the Server computer. The MS Mail Connector itself is represented by a directory object in the Connections container, whose Extension-Name attribute is set to the value MS.
For an Admin-Extension object whose Extension-Name attribute is GWSample, you would copy extension DLLs into one or more the following directories, depending on the platform:
Platform of Windows NT Server | Destination Directory |
---|---|
Intel CPU architecture | \\SERVER\ADD-INS\GWSample\i386 |
MIPS CPU architecture | \\SERVER\ADD-INS\GWSample\MIPS |
DEC ALPHA CPU architecture | \\SERVER\ADD-INS\GWSample\ALPHA |
PowerPC | \\SERVER\ADD-INS\GWSample\PPC |
You need both an Administrator extension DLL and a new Admin-Extension object for each supported platform. For this example, you would install the Admin-Extension objects for the i386 and MIPS platforms into the following locations in the DIT:
Example: Installation locations for Admin-Extension objects
The procedure for installing a new Administrator extension DLL is different than that for replacing an installed Administrator extension DLL with a newer version:
To install a new Administrator extension DLL
To install a newer version of an existing Administrator extension DLL
The following sample code is from the GWSETUP.C file in the directory \SAMPLES\DbMsg\EXCHANGE\GWSETUP. It performs several of the steps needed to install an Administrator extension DLL.
//$--DoInstall---------------------------------------------------------- // Install the application. // -------------------------------------------------------------------- void DoInstall( // RETURNS: nothing void) // no arguments { // // Check if admin extension object exists // sprintf(szLocalExtensionDll, "%s\\%s", szSourcePath, EXTENSION_DLL); sprintf(szRemoteExtensionDll, "%s\\%s", szExtnDestDir, EXTENSION_DLL); sprintf(szBackupExtensionDll, "%s.bak", EXTENSION_DLL); sprintf(szRemoveExtensionDll, "%s\\%s.bak", szExtnDestDir, EXTENSION_DLL); hr = HrVerifyAdminExtensionVersion( szLocalExtensionDll, szServer, szSite, ADD_INS_TYPE, MACHINE_TYPE, &dwExtnVersionMS, &dwExtnVersionLS, &fInstallAdminExt, &fDeleteAdminExt); // // Remove admin extension object // if((fInstallAdminExt == TRUE) && (fDeleteAdminExt == TRUE)) { hr = HrRemoveAdminExtension( szServer, szSite, ADD_INS_TYPE, MACHINE_TYPE); RemoveFile(szRemoveExtensionDll, cmoForce); RenameFile(szRemoteExtensionDll, szBackupExtensionDll); RemoveFile(szRemoveExtensionDll, cmoForce); } // // Add server files to copy list // ClearCopyList(); if(fInstallAdminExt == TRUE) { AddSectionFilesToCopyList(SECTION_EXTENSION, szSourcePath, szExtnDestDir); } if(fInstallAddrType == TRUE) { AddSectionFilesToCopyList(SECTION_ADDRESS, szSourcePath, szAddrDestDir); } // // Copy server files // if((fInstallAdminExt == TRUE) || (fInstallAddrType == TRUE)) { CopyFilesInCopyList(); } // // Install admin extension object // if(fInstallAdminExt == TRUE) { hr = HrInstallAdminExtension( szServer, szSite, ADD_INS_DISPLAY_NAME, ADD_INS_TYPE, dwExtnVersionMS, dwExtnVersionLS, EXTENSION_DLL, MACHINE_TYPE); } }