SHLoadContextMenuExtensions

This function loads the context menu extensions from handlers that are listed in the registry for the context-class pair that is specified.

BOOL SHLoadContextMenuExtensions(
  IUnknown* punkOwner,
  LPCTSTR pszContext,
  LPCTSTR pszClass,
  HMENU hmenu,
  UINT idCmdFirst,
  UINT idCmdLast,
  HANDLE* phCMExtensions
); 

Parameters

  • punkOwner
    [in] Interface pointer to the owner of the data.
  • pszContext
    [in] Pointer to the context identifier string.
  • pszClass
    [in] Pointer to the class identifier string.
  • hmenu
    [in] Handle to the menu in which to insert items.
  • idCmdFirst
    [in] First command ID in available range.
  • idCmdLast
    [in] Last command ID in available range.
  • phCMExtensions
    [out] Pointer to the handle to the context menu extensions.

Return Values

This function returns TRUE if it is successful and FALSE if it fails.

Remarks

This function adds menu items to hmenu in the range [idCmdFirst, idCmdLast].

The handle to the context menu extensions abstraction object returned in *phCMExtensions must be freed by a call to SHFreeContextMenuExtensions.

Requirements

OS Versions: Windows CE .NET 4.2 and later.
Header: Aygshell.h.
Link Library: Aygshell.lib.

See Also

AYGShell Functions

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.