Using Administrator Extension Functions (Called by Administrator Program)

The following table lists function calls made to the Administrator extension DLL from the Microsoft Exchange Server Administrator program. The Purpose section of the table describes whether the function's presence in the extension DLL is mandatory or optional. If you choose not to implement an optional function, you must pass NULL to the Administrator program to indicate that the function is not implemented.

Except for the ADMIN_Initialize function, entries in the following table refer to prototypes of functions that you write and use in the extension DLL. For more information on the use of these functions, see ADMINEXT.H.

Administrator Extension Functions (Called by Administrator Program)

Function Purpose When called
ADMIN_Initialize Mandatory DLL entry point. This function is called explicitly, not through a pointer reference, and for this reason must have the name ADMIN_Initialize.

Initiates handshaking, giving your DLL three MAPI interface pointers (a session handle, an address book object pointer, and an address book container pointer) and pointers to the Administrator extension functions provided by the Administrator program. You need to pass back a list of pointers to the remaining functions listed in this table. For further details, see the information about initializing connections with ADMIN_Initialize in Initializing the Administrator Extension DLL.

After the DLL has been loaded and initialized by Windows.
InstallExtensionProc Not currently called by the Administrator program. Not called by the Administrator program.
DeinstallExtensionProc Mandatory. Called by the Administrator program to report that your object is being deleted. Called when deleting the directory object.
InitSheetProc Mandatory. Used by the Administrator program to query the Administrator extension DLL for descriptions of the property pages it supports. See Initializing Property Pages with InitSheetProc. Called once only, after ADMIN_Initialize has been called.
ShowPageProc Optional. Tells the Administrator program whether to show standard property pages. It is called once for each standard property page, but not for the extension property pages. Your DLL can prevent a standard page from being displayed by returning FALSE. After InitSheetProc has been called.
StartPageProc Optional. Tells the Administrator program which custom property page to display first by returning its index. Omit this function (pass NULL for its function pointer) or return -1 to display the first standard sheet. Called one time only, after ShowPageProc has been called.
HasHelpProc Optional. Tells the Administrator program whether the sheet has an associated online Help file. Called for each extension property page in your extension DLL. Return TRUE if the specific sheet has online help. As each property page is displayed.
DoHelpProc Optional. Displays sheet-specific Help when the Help button is selected for the active property page. When Help button is pressed.
SaveDataProc Optional. When another property page is selected, SaveDataProc is called for the original property page. When OK or Apply is pressed, the Administrator program calls both this function and CommitDataProc.

SaveDataProc and CommitDataProc are used together to support multistep data commitment. The SaveDataProc function can be used to validate data in the property page controls, or to copy data from field buffers to an undo buffer. Do not use the SaveDataProc function to save data permanently, or it will be difficult to undo changes if the user clicks the Cancel button.

When a new property page is selected or when the OK or Apply button is pressed.
CommitDataProc Optional. Instructs the Administrator extension DLL to store data permanently. CommitDataProc should be called only when the OK or Apply button is clicked. When the administrator moves between property pages, SaveDataProc is called to make sure that temporary buffers are updated. This is particularly important when several property pages access the same temporary buffer. When the OK or Apply button is pressed.
DeinitSheetProc Mandatory. Called to notify the Administrator extension DLL when the property sheet dialog box is about to be destroyed. After all property page dialog boxes are destroyed.

Structures listed in the following table communicate information between the Administrator program and the Administrator extension DLL. They are used by the functions listed in the preceding table:

Administrator Extension Structures

Structure Description
ADMIN_AdministratorConnections Contains useful connections (MAPI session information) made by the Administrator program.
ADMIN_AdministratorFunction Contains a list of pointers to the Administrator extension functions (called by extension DLL)
ADMIN_ExtensionFunction Contains a list of pointers to Administrator extension functions in the Administrator extension DLL. This structure is filled in by the extension DLL, and then passed back to the Administrator program during the DLL initialization process.
ADMIN_ObjectInfo Contains the following information:

· Name of the computer on which the application is running.

· DN of the object being administered.

· DNs of the home server running the information store and the message transfer agent.

· Language that the Administrator program is running, so that the extension DLL can match this language.

· Class of the object being manipulated. An extension DLL should verify that it is running against an object class that it supports. To do this, it uses the list of the object identifiers in ADMINEXT.H.

· Handle to the font that should be used if the extension DLL has any additional dialog boxes of its own that it draws separately from the property pages.

ADMIN_SheetInfo Specifies a property page dialog box.