Extending Property Pages for Snap-Ins

[This is preliminary documentation and subject to change.]

Property page extensions are based on a per-node extensibility mechanism so a snap-in can add one or more property pages to a property frame. More than one snap-in can be registered to extend behavior in this way for a given node. The size of the property sheet is determined by the primary snap-in and extensions are forced to accept that size. MMC implements two property sheet interfaces, IPropertySheetProvider and IPropertySheetCallback to incorporate property page extensions. The snap-in implements a third, IExtendPropertySheet.

The concept behind IPropertySheetProvider is similar to that for context menus: it implements Win32 property sheets as COM objects. This interface includes five methods. CreatePropertySheet is used to create a property sheet frame and FindPropertySheet determines whether a property sheet already exists. AddPrimaryPages collects pages from a primary snap-in and AddExtensionPages collects pages from extension snap-ins. Show displays a specific property sheet frame.

IPropertySheetCallback is a callback mechanism that incorporates two methods. AddPage allows a snap-in to add a single page to a property sheet and RemovePage allows a snap-in to remove a page.

Property pages are offered by snap-ins and by the console itself. The snap-in creates a page frame and adds its own items. Snap-ins can optionally ask the console to add pages provided by extension snap-ins. The console adds pages from extension snap-ins and returns control to the owner snap-in. Page size is determined by the primary snap-in and extension snap-ins are forced to use the same size. Maintaining a consistent size promotes usability and looks much better. A property page is another example of a feature being reusable because it is a COM object.