다음을 통해 공유


SHEnumPropSheetHandlers (Windows Embedded CE 6.0)

1/6/2010

For property sheet extension in Windows Mobile devices, this function enumerates the sub-keys under the class key hkey.

Note

This function is not implemented for Windows Embedded CE-based devices. It is provided as a stub in the operating system (OS) for application compatibility. This function will return FALSE for Windows Embedded CE OS versions.

Syntax

BOOL SHEnumPropSheetHandlers(
  HKEY hkey,
  int * pcPages,
  HPROPSHEETPAGE* prghPropPages,
  IShellPropSheetExt ** prgpispse
);

Parameters

  • hkey
    [in] The registry key order to enumerate.
  • pcPages
    [out] The number of pages added.
  • prghPropPages
    [in, out] Reference to an array of HPROPSHEETPAGE.
  • prgpispse
    [in, out] Reference to an array of IShellPropSheetExt interface pointers.

Return Value

TRUE if enumeration was successful; FALSE if enumeration failed.

Remarks

For each handler, the class is instantiated, queried for IshellPropSheetExt, and the IShellPropSheetExt::AddPages method is called. The handle to the page is then inserted in the array prghPropPages, and the pointer to the IShellPropSheetExt is added to prgpispse with one reference from the caller. (These should be released by the caller after the Windows Embedded CE PropertySheet function is called.) These two arrays should be allocated before calling SHEnumPropSheetHandlers.

Typical usage of this function would be to:

  • Allocate an array of HPROPSHEETPAGEs for the standard pages, plus MAX_EXTENSION_PAGES extension pages.
  • Fill a Windows Embedded CE PROPSHEETPAGE structure and call the Windows Embedded CE CreatePropertySheetPage function on each standard page.
  • Store the HPROPSHEETPAGE for the standard pages at the beginning of the array.
  • Open a registry key where the application has defined an extension.
  • Allocate an array of MAX_EXTENSION_PAGES IShellPropSheetExt interface pointers.
  • Call the SHEnumPropSheetHandlers function, passing in the hkey, a pointer to the first free HPROPSHEETPAGE array element, and a pointer to the array of IShellPropSheetExt interface pointers.
  • Call the Windows Embedded CE PropertySheet function to display the property sheet.
  • Release each interface pointer in the array of interface pointers.
  • Free both arrays.

SHEnumPropSheetHandlers assumes that prghPropPages and prgpispse have been allocated with enough space for up to MAX_EXTENSION_PAGES elements. The number of pages added is returned in *pcPages.

Requirements

Header aygshell.h
Library aygshell.lib
Windows Embedded CE Windows CE 3.0 and later

See Also

Reference

AYGShell Functions
PropertySheet
CreatePropertySheetPage
PROPSHEETPAGE