Platform SDK: Exchange Server

Initializing Property Pages with InitSheetProc

The purpose of the second initialization is to inform the Microsoft Exchange Server Administrator program about the property pages supported by the Administrator extension DLL. The Administrator program calls the InitSheetProc function, which is implemented by the extension DLL, and passes five parameters to the DLL:

Because the Administrator program knows the resource identifier of the dialog box after these initializations have been performed, it now calls the Windows CreateDialog function for each custom property page. After that function call, the extension DLL receives Windows messages. The Administrator program makes this call only if the tab for the custom property page is selected. If the user never looks at your property page, the Windows dialog procedure is not called.

The Administrator program displays the dialog box that contains extension property pages, but the functions that handle Windows messages to the dialog box are located in the extension DLL. The Administrator program will also communicate with your dialog box by calling the functions that you returned in the ADMIN_Initialize function.

If an error occurs during initialization, returning FALSE causes the Administrator program to display an error message to the user and not display the property pages for the object. If your DLL failed, you may still want to return TRUE and display a reduced (possibly zero) number of custom property pages.

For a list of functions that the DLL passes back to the Administrator program, see Using Administrator Extension Functions (Called by Administrator Program).